Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
Aigen::Vector Class Reference

Bounded owning vector with the planner's small Eigen-style value API. More...

#include <compat.hpp>

Inheritance diagram for Aigen::Vector:
Collaboration diagram for Aigen::Vector:

Public Member Functions

 Vector (std::size_t count=0, double value=0.0)
 Allocate initialized scalars.
 Vector (dipla::aigenlib::Vector values)
 Accept owning kernel output.
int size () const noexcept
 Signed vector length.
int rows () const noexcept
 Matrix-compatible row count.
int cols () const noexcept
 Matrix-compatible column count.
double operator() (std::size_t row, std::size_t column) const
 Checked matrix-style access.
Vector eval () const
 Produce a value, never an expression.
bool allFinite () const
 Validate every scalar.
double sum () const
 Sum all entries.
double norm () const
 Stable Euclidean length.
Vector & operator+= (const Vector &other)
 Add a same-sized vector.
bool isApprox (const Vector &other, double tolerance) const
 Relative norm comparison.

Static Public Member Functions

static Vector Zero (std::size_t count)
 Allocate zeros.
static Vector Constant (std::size_t count, double value)
 Allocate a constant.

Static Private Member Functions

static std::size_t checked_size (std::size_t count)
 Validate before allocating.

Detailed Description

Bounded owning vector with the planner's small Eigen-style value API.

No expression objects or implicit unbounded allocations are exposed.

Definition at line 72 of file compat.hpp.

Constructor & Destructor Documentation

◆ Vector() [1/2]

Aigen::Vector::Vector ( std::size_t count = 0,
double value = 0.0 )
inlineexplicit

Allocate initialized scalars.

Parameters
countLength.
valueInitial scalar.

Definition at line 75 of file compat.hpp.

◆ Vector() [2/2]

Aigen::Vector::Vector ( dipla::aigenlib::Vector values)
inline

Accept owning kernel output.

Parameters
valuesScalars.

Definition at line 78 of file compat.hpp.

Member Function Documentation

◆ allFinite()

bool Aigen::Vector::allFinite ( ) const
inline

Validate every scalar.

Returns
Whether finite.

Definition at line 97 of file compat.hpp.

◆ checked_size()

std::size_t Aigen::Vector::checked_size ( std::size_t count)
inlinestaticprivate

Validate before allocating.

Parameters
countRequested length.
Returns
Checked length.

Definition at line 123 of file compat.hpp.

◆ cols()

int Aigen::Vector::cols ( ) const
inlinenoexcept

Matrix-compatible column count.

Returns
One.

Definition at line 84 of file compat.hpp.

◆ Constant()

Vector Aigen::Vector::Constant ( std::size_t count,
double value )
inlinestatic

Allocate a constant.

Parameters
countLength.
valueScalar.
Returns
Owning vector.

Definition at line 93 of file compat.hpp.

◆ eval()

Vector Aigen::Vector::eval ( ) const
inline

Produce a value, never an expression.

Returns
Owning copy.

Definition at line 95 of file compat.hpp.

◆ isApprox()

bool Aigen::Vector::isApprox ( const Vector & other,
double tolerance ) const
inline

Relative norm comparison.

Parameters
otherVector.
toleranceRelative limit.
Returns
Whether approximately equal.

Definition at line 115 of file compat.hpp.

◆ norm()

double Aigen::Vector::norm ( ) const
inline

Stable Euclidean length.

Returns
Norm.

Definition at line 103 of file compat.hpp.

◆ operator()()

double Aigen::Vector::operator() ( std::size_t row,
std::size_t column ) const
inline

Checked matrix-style access.

Parameters
rowRow.
columnMust be zero.
Returns
Scalar.

Definition at line 86 of file compat.hpp.

◆ operator+=()

Vector & Aigen::Vector::operator+= ( const Vector & other)
inline

Add a same-sized vector.

Parameters
otherAddend.
Returns
This vector.

Definition at line 109 of file compat.hpp.

◆ rows()

int Aigen::Vector::rows ( ) const
inlinenoexcept

Matrix-compatible row count.

Returns
Length.

Definition at line 82 of file compat.hpp.

◆ size()

int Aigen::Vector::size ( ) const
inlinenoexcept

Signed vector length.

Returns
Bounded length.

Definition at line 80 of file compat.hpp.

◆ sum()

double Aigen::Vector::sum ( ) const
inline

Sum all entries.

Returns
Sum.

Definition at line 101 of file compat.hpp.

◆ Zero()

Vector Aigen::Vector::Zero ( std::size_t count)
inlinestatic

Allocate zeros.

Parameters
countLength.
Returns
Owning vector.

Definition at line 91 of file compat.hpp.


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