COPP C ABI
C interface for COPP trajectory optimization
Loading...
Searching...
No Matches
CoppVecF64 Struct Reference

Library-owned f64 vector returned to C. More...

#include <core.h>

Data Fields

double * data
 Pointer to the first element, or null for an empty vector.
size_t len
 Number of initialized elements.
size_t capacity
 Allocation capacity, used only by copp_vec_f64_free.

Detailed Description

Library-owned f64 vector returned to C.

C callers may read data[0..len] and must release the vector exactly once with copp_vec_f64_free.

Example

The example below reads a solver-returned vector and then releases it.

struct CoppVecF64 a = {0};
check(topp2_ra(problem, options, &a));
for (size_t k = 0; k < a.len; ++k) {
printf("a[%zu] = %.17g\n", k, a.data[k]);
}
void copp_vec_f64_free(struct CoppVecF64 vec)
Release a library-owned f64 vector returned by COPP.
enum CoppStatus topp2_ra(struct Topp2Problem problem, struct Topp2RaOptions options, struct CoppVecF64 *out_a)
Solve a TOPP2-RA problem.
Library-owned f64 vector returned to C.
Definition core.h:828
size_t len
Number of initialized elements.
Definition core.h:836
double * data
Pointer to the first element, or null for an empty vector.
Definition core.h:832

Definition at line 828 of file core.h.

Field Documentation

◆ data

double* CoppVecF64::data

Pointer to the first element, or null for an empty vector.

Definition at line 832 of file core.h.

◆ len

size_t CoppVecF64::len

Number of initialized elements.

Definition at line 836 of file core.h.

◆ capacity

size_t CoppVecF64::capacity

Allocation capacity, used only by copp_vec_f64_free.

Definition at line 840 of file core.h.


The documentation for this struct was generated from the following file:
  • bindings/c/include/copp/core.h