-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added comments and changed names so test refers to code tests and exp…
…eriments refers to numerical experiments
- Loading branch information
Showing
11 changed files
with
97 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
from solvers import * | ||
from plots import * | ||
|
||
|
||
s = Solver([0, 1, 2], 2, SignalPolynomial) | ||
# Example how to use Solver class | ||
s = Solver(samples=[0, 1, 2], model_size=2, model_type=SignalPolynomial) | ||
print(s.position_estimate) | ||
|
||
print("Ordinary Least Squares") | ||
s = OrdinaryLS([0, 1, 2], 2, SignalPolynomial) | ||
s.solve() | ||
print(s.position_estimate) | ||
|
||
print("Alternating Least Squares") | ||
s = AlternatingLS([0, 1, 2], 2, SignalPolynomial, hold_edges=False) | ||
s.solve() | ||
print(s.position_estimate) | ||
print(s.hold_edges) | ||
|
||
try: | ||
s = ConstrainedALS([0, 1, 2], 2, ConstrainedPolynomial, [1, 2, 3]) | ||
s.solve() | ||
print(s.position_estimate) | ||
except NotImplementedError: | ||
print("ConstrainedPolynomial is an abstract class!") | ||
|
||
print("Constrained Alternating Least Squares") | ||
u = ConstrainedALS([0, 1, 2], 2, SurfacePolynomial, [1, 2, 3]) | ||
u.solve() | ||
print(s.position_estimate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.