-
Notifications
You must be signed in to change notification settings - Fork 2
solved or count if no statelabel #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,7 +211,11 @@ isSolved, setSolvedCount! | |
| """ | ||
| getSolvedCount(v::State) = v.solves | ||
| function getSolvedCount(v::VariableDFG, solveKey::Symbol = :default) | ||
| return getState(v, solveKey) |> getSolvedCount | ||
| if hasState(v, solveKey) | ||
| return getState(v, solveKey) |> getSolvedCount | ||
| else | ||
| return 0 | ||
| end | ||
| end | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: All functions with deprecated Looking at this again, the verb and noun are both incorrect.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| function getSolvedCount(dfg::AbstractDFG, sym::Symbol, solveKey::Symbol = :default) | ||
| return getSolvedCount(getVariable(dfg, sym), solveKey) | ||
|
|
@@ -250,7 +254,11 @@ getSolved, setSolved! | |
| """ | ||
| isSolved(v::State) = 0 < v.solves | ||
| function isSolved(v::VariableDFG, solveKey::Symbol = :default) | ||
| return getState(v, solveKey) |> isSolved | ||
| if hasState(v, solveKey) | ||
| return getState(v, solveKey) |> isSolved | ||
| else | ||
| return false | ||
| end | ||
|
Comment on lines
256
to
+261
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would use the direct field access here as discussed (TODO find ref). For a |
||
| end | ||
| function isSolved(dfg::AbstractDFG, sym::Symbol, solveKey::Symbol = :default) | ||
| return isSolved(getVariable(dfg, sym), solveKey) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The submersion is a map and has to be explicitly provided. This example of 2
e1 = [1, 0, 0]"partials" shows why:f(R) = vee(log(R))ᵀ * e₁ # SO(3) -> ℝ¹f(R) = R * e₁ # SO(3) -> S²