Phylogeny

PortfolioOptimisers.PhylogenyResultType
struct PhylogenyResult{__T_X} <: AbstractPhylogenyResult

Carries 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) -> PhylogenyResult

Keywords 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)).

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

source