Private API

This page lists non-exported (internal) symbols of CTFlows.Trajectories.


From CTFlows.Trajectories

_aug_split_solution [Function]

CTFlows.Trajectories._aug_split_solutionFunction
_aug_split_solution(u, x0, pv0) -> Tuple{Any, Any, Any}

Split an augmented final state u into state x, costate p, and variable costate pv components.

For Hamiltonian systems, n_p = n_x always, so the augmented state is [x; p; pv] where n_pv = length(u) - 2 * n_x.

Arguments

  • u: Augmented final state [x; p; pv] from integration.
  • n::Int: The state dimension n_x = n_p.

Returns

  • Tuple{AbstractVector, AbstractVector, AbstractVector}: Tuple (x, p, pv).

Notes

  • Internal helper used by build_trajectory for AugmentedHamiltonianEndPointConfig.
  • Assumes n_p = n_x invariant for Hamiltonian systems.

_ham_split_solution [Function]

CTFlows.Trajectories._ham_split_solutionFunction
_ham_split_solution(u::AbstractVector, x0::Number) = (only(u[1:1]), only(u[2:2]))
_ham_split_solution(u::AbstractVector, x0::AbstractVector) = (u[1:n], u[n+1:2n])
_ham_split_solution(u::AbstractMatrix, x0::AbstractMatrix) = (u[1:n, :], u[n+1:2n, :])

Split a combined state vector into state and costate components, preserving the shape of x0.

For scalar x0, extracts single elements and coerces them back to scalars. For vector/matrix x0, extracts views of the appropriate size.