Phylogeny
PortfolioOptimisers.PhylogenyResult — Type
struct PhylogenyResult{__T_X} <: AbstractPhylogenyResultCarries a validated phylogeny matrix or a centrality vector.
PhylogenyResult stores the output of phylogeny-based estimation routines, such as network or clustering-based phylogeny matrices, or centrality vectors. It is used throughout the package to represent validated phylogeny structures for constraint generation, centrality analysis, and related workflows.
Fields
X: Phylogeny matrix or vector.
Constructors
PhylogenyResult(; X::ArrNum) -> PhylogenyResultKeywords correspond to the struct's fields.
Validation
!isempty(X)..IfXis aMatNum`:- Must be symmetric,
LinearAlgebra.issymmetric(X) - Must have zero diagonal,
all(iszero, LinearAlgebra.diag(X)).
- Must be symmetric,
Examples
julia> PhylogenyResult(; X = [0 1 0; 1 0 1; 0 1 0])PhylogenyResult X ┴ 3×3 Matrix{Int64}julia> PhylogenyResult(; X = [0.2, 0.5, 0.3])PhylogenyResult X ┴ Vector{Float64}: [0.2, 0.5, 0.3]Related