Skip to content

26Q2/refac/amp15#1230

Draft
dehann wants to merge 6 commits intodevelopfrom
26Q2/refac/amp15
Draft

26Q2/refac/amp15#1230
dehann wants to merge 6 commits intodevelopfrom
26Q2/refac/amp15

Conversation

@dehann
Copy link
Copy Markdown
Member

@dehann dehann commented May 6, 2026

Comment on lines +2 to +3


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change



function lowerHomotopyReprKind(
varT::HomotopyRepr{R,K,T,L}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
varT::HomotopyRepr{R,K,T,L}
varT::HomotopyRepr{R, K, T, L},

T <: AbstractStateType,
L <: AbstractPartialLegacyCompat, # FIXME use <:AbstractPartialTraits
}
typemeta = TypeMetadata(typeof(varT))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
typemeta = TypeMetadata(typeof(varT))
return typemeta = TypeMetadata(typeof(varT))

# StructUtils.lower(T::HomotopyDensityDFG) = lowerStateKind(T)
# StructUtils.lift(::Type{HomotopyDensityDFG}, s) = liftStateKind(s)


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

##
## ====================================================================================================


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

- 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)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
1 => Matrix{Float64}(I, manifold_dimension(getManifold(reprkind)), manifold_dimension(getManifold(reprkind)))
1 => Matrix{Float64}(
I,
manifold_dimension(getManifold(reprkind)),
manifold_dimension(getManifold(reprkind)),
),

Comment on lines +171 to +173
structure::Dict{Int,Vector{Int}} = Dict(
1 => collect(1:length(points))
)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
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}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
structure = Dict{Int,Vector{Int}}(), # TODO, upgrade to sparsevec of Vector{Int}
structure = Dict{Int, Vector{Int}}(), # TODO, upgrade to sparsevec of Vector{Int}

Comment on lines +258 to +260



Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change

Comment on lines +79 to +98
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
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.

Comment on lines +22 to +23
const AbstractPartialLegacyCompat = Union{<:DistributedFactorGraphs.AbstractPartialTraits, Nothing, Tuple, Vector{Int}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
const AbstractPartialLegacyCompat = Union{<:DistributedFactorGraphs.AbstractPartialTraits, Nothing, Tuple, Vector{Int}}
const AbstractPartialLegacyCompat =
Union{<:DistributedFactorGraphs.AbstractPartialTraits, Nothing, Tuple, Vector{Int}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants