COPP C++ API
C++ interface for COPP trajectory optimization
Loading...
Searching...
No Matches
copp::Profile3rd Struct Reference

Owned third-order TOPP/COPP profile. More...

#include <interpolation.hpp>

Public Member Functions

 Profile3rd ()=default
 Profile3rd (std::vector< double > a_values, std::vector< double > b_values)
 Profile3rd (std::vector< double > a_values, std::vector< double > b_values, std::pair< std::size_t, std::size_t > num_stationary)
 Profile3rd (std::vector< double > a_values, std::vector< double > b_values, std::size_t stationary_start, std::size_t stationary_end)
std::size_t len () const noexcept
std::size_t size () const noexcept
bool empty () const noexcept
std::pair< std::size_t, std::size_t > num_stationary () const noexcept
Profile3rdRef ref () const
 Borrow this owned profile without copying arrays.
Profile3rdRef slice (std::size_t idx_s_start, std::size_t idx_s_final) const
 Borrow a closed station subrange idx_s_start..=idx_s_final.
Profile3rdRef segment (std::size_t idx_s) const
 Borrow one segment as the two-node profile idx_s..=idx_s+1.

Public Attributes

std::vector< double > a
std::vector< double > b
std::size_t num_stationary_start = 0
std::size_t num_stationary_end = 0

Detailed Description

Owned third-order TOPP/COPP profile.

a and b are both node-based and must have the same length as the station grid s used for interpolation. Public fields intentionally stay writable to match the lightweight Rust/Python storage style; constructors validate the initial shape, while direct later edits are the user's responsibility.

Definition at line 68 of file interpolation.hpp.

Constructor & Destructor Documentation

◆ Profile3rd() [1/4]

copp::Profile3rd::Profile3rd ( )
default

◆ Profile3rd() [2/4]

copp::Profile3rd::Profile3rd ( std::vector< double > a_values,
std::vector< double > b_values )

◆ Profile3rd() [3/4]

copp::Profile3rd::Profile3rd ( std::vector< double > a_values,
std::vector< double > b_values,
std::pair< std::size_t, std::size_t > num_stationary )

◆ Profile3rd() [4/4]

copp::Profile3rd::Profile3rd ( std::vector< double > a_values,
std::vector< double > b_values,
std::size_t stationary_start,
std::size_t stationary_end )

Member Function Documentation

◆ len()

std::size_t copp::Profile3rd::len ( ) const
inlinenoexcept

Definition at line 87 of file interpolation.hpp.

◆ size()

std::size_t copp::Profile3rd::size ( ) const
inlinenoexcept

Definition at line 88 of file interpolation.hpp.

◆ empty()

bool copp::Profile3rd::empty ( ) const
inlinenoexcept

Definition at line 89 of file interpolation.hpp.

◆ num_stationary()

std::pair< std::size_t, std::size_t > copp::Profile3rd::num_stationary ( ) const
inlinenoexcept

Definition at line 90 of file interpolation.hpp.

◆ ref()

Profile3rdRef copp::Profile3rd::ref ( ) const

Borrow this owned profile without copying arrays.

◆ slice()

Profile3rdRef copp::Profile3rd::slice ( std::size_t idx_s_start,
std::size_t idx_s_final ) const

Borrow a closed station subrange idx_s_start..=idx_s_final.

◆ segment()

Profile3rdRef copp::Profile3rd::segment ( std::size_t idx_s) const

Borrow one segment as the two-node profile idx_s..=idx_s+1.

Member Data Documentation

◆ a

std::vector<double> copp::Profile3rd::a

Definition at line 70 of file interpolation.hpp.

◆ b

std::vector<double> copp::Profile3rd::b

Definition at line 71 of file interpolation.hpp.

◆ num_stationary_start

std::size_t copp::Profile3rd::num_stationary_start = 0

Definition at line 72 of file interpolation.hpp.

◆ num_stationary_end

std::size_t copp::Profile3rd::num_stationary_end = 0

Definition at line 73 of file interpolation.hpp.


The documentation for this struct was generated from the following file: