Drake
drake::symbolic::internal Namespace Reference

Functions

void CodeGenDenseData (const string &function_name, const vector< Variable > &parameters, const Expression *const data, const int size, ostream *const os)
 
void CodeGenDenseMeta (const string &function_name, const int parameter_size, const int rows, const int cols, ostream *const os)
 
void CodeGenSparseData (const string &function_name, const vector< Variable > &parameters, const int outer_index_size, const int non_zeros, const int *const outer_index_ptr, const int *const inner_index_ptr, const Expression *const value_ptr, ostream *const os)
 
void CodeGenSparseMeta (const string &function_name, const int parameter_size, const int rows, const int cols, const int non_zeros, const int outer_indices, const int inner_indices, ostream *const os)
 
template<typename MonomialOrder >
void AddMonomialsOfDegreeN (const Variables &vars, int degree, const Monomial &b, std::set< Monomial, MonomialOrder > *const bin)
 Generates [b * m for m in MonomialBasis(vars, degree)] and push them to bin. More...
 
template<int rows>
Eigen::Matrix< Monomial, rows, 1 > ComputeMonomialBasis (const Variables &vars, int degree)
 Returns all monomials up to a given degree under the graded reverse lexicographic order. More...
 

Function Documentation

◆ AddMonomialsOfDegreeN()

void drake::symbolic::internal::AddMonomialsOfDegreeN ( const Variables vars,
int  degree,
const Monomial b,
std::set< Monomial, MonomialOrder > *const  bin 
)

Generates [b * m for m in MonomialBasis(vars, degree)] and push them to bin.

Used as a helper function to implement MonomialBasis.

Template Parameters
MonomialOrderprovides a monomial ordering.

◆ CodeGenDenseData()

void CodeGenDenseData ( const string &  function_name,
const vector< Variable > &  parameters,
const Expression *const  data,
const int  size,
ostream *const  os 
)

◆ CodeGenDenseMeta()

void CodeGenDenseMeta ( const string &  function_name,
const int  parameter_size,
const int  rows,
const int  cols,
ostream *const  os 
)

◆ CodeGenSparseData()

void drake::symbolic::internal::CodeGenSparseData ( const string &  function_name,
const vector< Variable > &  parameters,
const int  outer_index_size,
const int  non_zeros,
const int *const  outer_index_ptr,
const int *const  inner_index_ptr,
const Expression *const  value_ptr,
ostream *const  os 
)

◆ CodeGenSparseMeta()

void drake::symbolic::internal::CodeGenSparseMeta ( const string &  function_name,
const int  parameter_size,
const int  rows,
const int  cols,
const int  non_zeros,
const int  outer_indices,
const int  inner_indices,
ostream *const  os 
)

◆ ComputeMonomialBasis()

Eigen::Matrix<Monomial, rows, 1> drake::symbolic::internal::ComputeMonomialBasis ( const Variables vars,
int  degree 
)

Returns all monomials up to a given degree under the graded reverse lexicographic order.

This is called by MonomialBasis functions defined below.

Template Parameters
rowsNumber of rows or Dynamic