diff --git a/src/methods_named_trajectory.jl b/src/methods_named_trajectory.jl index 4110b10..1f3fa42 100644 --- a/src/methods_named_trajectory.jl +++ b/src/methods_named_trajectory.jl @@ -36,6 +36,16 @@ function Base.vec(Z::NamedTrajectory) end +""" + length(::NamedTrajectory) + +Returns the length of all variables of the trajectory. +""" +function Base.length(Z::NamedTrajectory) + return Z.dim * Z.T + Z.global_dim +end + + """ copy(::NamedTrajectory)