Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/entities/HomotopyDensity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ abstract type AbstractPartialTrait end
topologykind::HT
formkind::RF
statekind::T
partial::PT = nothing & (ignore = true,) #TODO deprecated field, still needed for AMP.
# partials field needed for AMP v0.15, will be JSON ignored in DFG v0.29, needs better solution by DFG v0.30
# FIXME, rename to subbmersion or deprecate completely?
""" partials field needed for AMP v0.15, will be JSON ignored in DFG v0.29, needs better solution by DFG v0.30 """
partial::PT = nothing & (ignore = true,)
Comment on lines +40 to +42

@Affie Affie Jul 13, 2026

Copy link
Copy Markdown
Member

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²

end

StructUtils.structlike(::StructUtils.StructStyle, ::Type{<:HomotopyReprDFG}) = true
Expand Down
12 changes: 10 additions & 2 deletions src/services/variable_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

@Affie Affie Jul 13, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: All functions with deprecated solveKey name is not DFG v1 ready yet and un-exported.

Looking at this again, the verb and noun are both incorrect.

  • the noun should match the field name solves
  • for the verb we discussed tally: Calculates value of countable field (ex. number of solves completed)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tallySolves(v::VariableDFG) should still count the solves across all states though, so no default state_label.

function getSolvedCount(dfg::AbstractDFG, sym::Symbol, solveKey::Symbol = :default)
return getSolvedCount(getVariable(dfg, sym), solveKey)
Expand Down Expand Up @@ -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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The 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 list alternative we have listStates and can add a whereSolves filter, ie. whereSolves = >(0).

end
function isSolved(dfg::AbstractDFG, sym::Symbol, solveKey::Symbol = :default)
return isSolved(getVariable(dfg, sym), solveKey)
Expand Down
Loading