Robot Control Library
rc_vector_t Struct Reference

Struct containing the state of a vector and a pointer to dynamically allocated memory to hold its contents. More...

#include <rc/math/vector.h>

Data Fields

int len
 number of elements in the vector More...
 
double * d
 pointer to dynamically allocated data More...
 
int initialized
 initialization flag More...
 

Detailed Description

Struct containing the state of a vector and a pointer to dynamically allocated memory to hold its contents.

Set and read values directly with this code:

vec.d[position]=new_value; // set value in the vector
value = v.d[pos]; // get value from vector
Examples:
rc_altitude.c, rc_benchmark_algebra.c, rc_test_algebra.c, rc_test_kalman.c, rc_test_matrix.c, rc_test_polynomial.c, and rc_test_vector.c.

Field Documentation

◆ len

int len

number of elements in the vector

◆ d

double* d

pointer to dynamically allocated data

Examples:
rc_altitude.c, rc_test_kalman.c, and rc_test_vector.c.

◆ initialized

int initialized

initialization flag


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