Conversation
|
|
||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
|
|
||
|
|
||
| function lowerHomotopyReprKind( | ||
| varT::HomotopyRepr{R,K,T,L} |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| varT::HomotopyRepr{R,K,T,L} | |
| varT::HomotopyRepr{R, K, T, L}, |
| T <: AbstractStateType, | ||
| L <: AbstractPartialLegacyCompat, # FIXME use <:AbstractPartialTraits | ||
| } | ||
| typemeta = TypeMetadata(typeof(varT)) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| typemeta = TypeMetadata(typeof(varT)) | |
| return typemeta = TypeMetadata(typeof(varT)) |
| # StructUtils.lower(T::HomotopyDensityDFG) = lowerStateKind(T) | ||
| # StructUtils.lift(::Type{HomotopyDensityDFG}, s) = liftStateKind(s) | ||
|
|
||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| ## | ||
| ## ==================================================================================================== | ||
|
|
||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| - When lowered or for serde, this field is likely to hold Dict{Int, Vector{Float64}}. | ||
| """ | ||
| trailing_details::Dict{Int, Matrix{Float64}} = Dict( | ||
| 1 => Matrix{Float64}(I, manifold_dimension(getManifold(reprkind)), manifold_dimension(getManifold(reprkind))) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| 1 => Matrix{Float64}(I, manifold_dimension(getManifold(reprkind)), manifold_dimension(getManifold(reprkind))) | |
| 1 => Matrix{Float64}( | |
| I, | |
| manifold_dimension(getManifold(reprkind)), | |
| manifold_dimension(getManifold(reprkind)), | |
| ), |
| structure::Dict{Int,Vector{Int}} = Dict( | ||
| 1 => collect(1:length(points)) | ||
| ) |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| structure::Dict{Int,Vector{Int}} = Dict( | |
| 1 => collect(1:length(points)) | |
| ) | |
| structure::Dict{Int, Vector{Int}} = Dict(1 => collect(1:length(points))) |
| principal_coeffs = Float64[], | ||
| principal_elements = P[], # FIXME convert to Vector{Matrix{Float64}} instead, using affine_matrix | ||
| principal_details = Matrix{Float64}[], # TODO, upgrade to SMatrix, needs dimension | ||
| trailing_details = Dict{Int,Matrix{Float64}}(), # TODO, upgrade to sparsevec |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| trailing_details = Dict{Int,Matrix{Float64}}(), # TODO, upgrade to sparsevec | |
| trailing_details = Dict{Int, Matrix{Float64}}(), # TODO, upgrade to sparsevec |
| principal_details = Matrix{Float64}[], # TODO, upgrade to SMatrix, needs dimension | ||
| trailing_details = Dict{Int,Matrix{Float64}}(), # TODO, upgrade to sparsevec | ||
| mean_parents = Int[], | ||
| structure = Dict{Int,Vector{Int}}(), # TODO, upgrade to sparsevec of Vector{Int} |
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| structure = Dict{Int,Vector{Int}}(), # TODO, upgrade to sparsevec of Vector{Int} | |
| structure = Dict{Int, Vector{Int}}(), # TODO, upgrade to sparsevec of Vector{Int} |
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| topology <: AbstractHomotopyTopology, | ||
| reprtype <: AbstractDensityBasis, | ||
| statetype <: Union{<:AbstractStateType, <:AbstractManifold}, # AbstractManifold used by AMP, but only StateType supports serde | ||
| L <: AbstractPartialLegacyCompat, # FIXME use <:AbstractPartialTraits | ||
| } | ||
| """ | ||
| Used for either DistributedFactorGraphs statetype or Manifolds.jl manifold type, depending on context. | ||
| Expect official support for serde only for DFG statetypes. Note, DFG statetypes are built on top of Manifolds.jl. | ||
| Use `getManifold(::HomotopyRepr)` to get the manifold type regardless of context. | ||
|
|
||
| Note, and explicit object `statekind` is needed for the Manifolds.jl only context, but note this field is not serialized | ||
| """ | ||
| statekind::statetype | ||
| """ | ||
| Future of partials is to use traits, so an abstract type is warranted. | ||
| Legacy is object of either Nothing, Tuple, or Vector{Int}, but something better is needed | ||
| """ | ||
| partial::L | ||
| end | ||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| topology <: AbstractHomotopyTopology, | |
| reprtype <: AbstractDensityBasis, | |
| statetype <: Union{<:AbstractStateType, <:AbstractManifold}, # AbstractManifold used by AMP, but only StateType supports serde | |
| L <: AbstractPartialLegacyCompat, # FIXME use <:AbstractPartialTraits | |
| } | |
| """ | |
| Used for either DistributedFactorGraphs statetype or Manifolds.jl manifold type, depending on context. | |
| Expect official support for serde only for DFG statetypes. Note, DFG statetypes are built on top of Manifolds.jl. | |
| Use `getManifold(::HomotopyRepr)` to get the manifold type regardless of context. | |
| Note, and explicit object `statekind` is needed for the Manifolds.jl only context, but note this field is not serialized | |
| """ | |
| statekind::statetype | |
| """ | |
| Future of partials is to use traits, so an abstract type is warranted. | |
| Legacy is object of either Nothing, Tuple, or Vector{Int}, but something better is needed | |
| """ | |
| partial::L | |
| end | |
| topology <: AbstractHomotopyTopology, | |
| reprtype <: AbstractDensityBasis, | |
| statetype <: Union{<:AbstractStateType, <:AbstractManifold}, # AbstractManifold used by AMP, but only StateType supports serde | |
| L <: AbstractPartialLegacyCompat, # FIXME use <:AbstractPartialTraits | |
| } | |
| """ | |
| Used for either DistributedFactorGraphs statetype or Manifolds.jl manifold type, depending on context. | |
| Expect official support for serde only for DFG statetypes. Note, DFG statetypes are built on top of Manifolds.jl. | |
| Use `getManifold(::HomotopyRepr)` to get the manifold type regardless of context. |
| const AbstractPartialLegacyCompat = Union{<:DistributedFactorGraphs.AbstractPartialTraits, Nothing, Tuple, Vector{Int}} | ||
|
|
There was a problem hiding this comment.
[JuliaFormatter] reported by reviewdog 🐶
| const AbstractPartialLegacyCompat = Union{<:DistributedFactorGraphs.AbstractPartialTraits, Nothing, Tuple, Vector{Int}} | |
| const AbstractPartialLegacyCompat = | |
| Union{<:DistributedFactorGraphs.AbstractPartialTraits, Nothing, Tuple, Vector{Int}} |
See related PR in AMP: