Skip to content

Commit bd9e6b4

Browse files
committed
comment out
1 parent adb51aa commit bd9e6b4

File tree

1 file changed

+35
-37
lines changed

1 file changed

+35
-37
lines changed

examples/python/try_import.py

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import tiny_solver
2-
from tiny_solver import GaussNewtonOptimizer, Problem, LinearSolver, OptimizerOptions, first_derivative_test
2+
from tiny_solver import GaussNewtonOptimizer, Problem, LinearSolver, OptimizerOptions
33
from tiny_solver.factors import PriorFactor, BetweenFactorSE2, PyFactor
44
from tiny_solver.loss_functions import HuberLoss
55
import numpy as np
@@ -19,42 +19,40 @@ def main():
1919
print(f"{tiny_solver.__version__=}")
2020
print(dir(tiny_solver))
2121

22-
print(dir(LinearSolver.SparseCholesky))
23-
opt_option = OptimizerOptions(linear_solver_type=LinearSolver.SparseQR, max_iteration=12, verbosity_level=1)
24-
print(opt_option)
25-
loss = HuberLoss(1.0)
26-
print(loss)
27-
a = np.array([1.0, 2.0])
28-
# j = first_derivative_test(f, a)
29-
# print(j)
30-
a = PyFactor(f)
31-
a.call_func()
32-
exit()
33-
# print(tiny_solver.sum_as_string(1, 2))
34-
35-
# tiny_solver.mult(np.zeros((1, 2)))
36-
# a = tiny_solver.Dual64()
37-
# print(a.first_derivative)
38-
b = BetweenFactorSE2(1.0, 2.0, 3.0)
39-
# print("factor module\n", dir(factors))
40-
# b = Costf(1.0, 2.0, 3.0)
41-
42-
print(type(b))
43-
print(dir(b))
44-
print(b)
45-
problem = Problem()
46-
print(dir(problem))
47-
problem.num = 200
48-
print(problem.num)
49-
d = PriorFactor(np.array([1.0, 2.0, 3.0]))
50-
problem.add_residual_block(1, [("aa", 1)], d)
51-
problem.add_residual_block(1, [("aaa", 1)], b)
52-
# c.add_residual_block(1, [("aaa", 1)])
53-
# c.add_residual_block(1, [("aa", 1)])
54-
# d = tiny_solver.BetweenFactor()
55-
# d.ttt()
56-
# tiny_solver.te(d)
57-
optimizer = GaussNewtonOptimizer()
22+
# print(dir(LinearSolver.SparseCholesky))
23+
# opt_option = OptimizerOptions(linear_solver_type=LinearSolver.SparseQR, max_iteration=12, verbosity_level=1)
24+
# print(opt_option)
25+
# loss = HuberLoss(1.0)
26+
# print(loss)
27+
# a = np.array([1.0, 2.0])
28+
# # j = first_derivative_test(f, a)
29+
# # print(j)
30+
# a = PyFactor(f)
31+
# # print(tiny_solver.sum_as_string(1, 2))
32+
33+
# # tiny_solver.mult(np.zeros((1, 2)))
34+
# # a = tiny_solver.Dual64()
35+
# # print(a.first_derivative)
36+
# b = BetweenFactorSE2(1.0, 2.0, 3.0)
37+
# # print("factor module\n", dir(factors))
38+
# # b = Costf(1.0, 2.0, 3.0)
39+
40+
# print(type(b))
41+
# print(dir(b))
42+
# print(b)
43+
# problem = Problem()
44+
# print(dir(problem))
45+
# problem.num = 200
46+
# print(problem.num)
47+
# d = PriorFactor(np.array([1.0, 2.0, 3.0]))
48+
# problem.add_residual_block(1, [("aa", 1)], d)
49+
# problem.add_residual_block(1, [("aaa", 1)], b)
50+
# # c.add_residual_block(1, [("aaa", 1)])
51+
# # c.add_residual_block(1, [("aa", 1)])
52+
# # d = tiny_solver.BetweenFactor()
53+
# # d.ttt()
54+
# # tiny_solver.te(d)
55+
# optimizer = GaussNewtonOptimizer()
5856
# optimizer.optimize(problem, {"aa": np.array([123, 2, 3, 4], dtype=np.float64)})
5957

6058

0 commit comments

Comments
 (0)