Public Member Functions | List of all members
gtsam::DiscreteKeys Struct Reference

DiscreteKeys is a set of keys that can be assembled using the & operator. More...

#include <DiscreteKey.h>

Inheritance diagram for gtsam::DiscreteKeys:
Inheritance graph
[legend]

Public Member Functions

std::map< Key, size_tcardinalities () const
 Return a map from index to cardinality. More...
 
 DiscreteKeys ()
 Constructor for serialization. More...
 
 DiscreteKeys (const DiscreteKey &key)
 Construct from a key. More...
 
 DiscreteKeys (const std::vector< DiscreteKey > &keys)
 Construct from a vector of keys. More...
 
 DiscreteKeys (const std::vector< int > &cs)
 Construct from cardinalities with default names. More...
 
 DiscreteKeys (std::map< Key, size_t > cardinalities)
 Construct from cardinalities. More...
 
bool equals (const DiscreteKeys &other, double tol=0) const
 Check equality to another DiscreteKeys object. More...
 
KeyVector indices () const
 Return a vector of indices. More...
 
DiscreteKeysoperator& (const DiscreteKey &key)
 Add a key (non-const!) More...
 
DiscreteKeysoperator& (const DiscreteKeys &keys)
 Add multiple keys (non-const!) More...
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
 Print the keys and cardinalities. More...
 

Detailed Description

DiscreteKeys is a set of keys that can be assembled using the & operator.

Definition at line 41 of file DiscreteKey.h.

Constructor & Destructor Documentation

◆ DiscreteKeys() [1/5]

gtsam::DiscreteKeys::DiscreteKeys ( )
inline

Constructor for serialization.

Definition at line 47 of file DiscreteKey.h.

◆ DiscreteKeys() [2/5]

gtsam::DiscreteKeys::DiscreteKeys ( const DiscreteKey key)
inlineexplicit

Construct from a key.

Definition at line 50 of file DiscreteKey.h.

◆ DiscreteKeys() [3/5]

gtsam::DiscreteKeys::DiscreteKeys ( std::map< Key, size_t cardinalities)
inlineexplicit

Construct from cardinalities.

Definition at line 53 of file DiscreteKey.h.

◆ DiscreteKeys() [4/5]

gtsam::DiscreteKeys::DiscreteKeys ( const std::vector< DiscreteKey > &  keys)
inline

Construct from a vector of keys.

Definition at line 58 of file DiscreteKey.h.

◆ DiscreteKeys() [5/5]

gtsam::DiscreteKeys::DiscreteKeys ( const std::vector< int > &  cs)

Construct from cardinalities with default names.

Definition at line 26 of file DiscreteKey.cpp.

Member Function Documentation

◆ cardinalities()

map< Key, size_t > gtsam::DiscreteKeys::cardinalities ( ) const

Return a map from index to cardinality.

Definition at line 39 of file DiscreteKey.cpp.

◆ equals()

bool gtsam::DiscreteKeys::equals ( const DiscreteKeys other,
double  tol = 0 
) const

Check equality to another DiscreteKeys object.

Definition at line 59 of file DiscreteKey.cpp.

◆ indices()

KeyVector gtsam::DiscreteKeys::indices ( ) const

Return a vector of indices.

Definition at line 33 of file DiscreteKey.cpp.

◆ operator&() [1/2]

DiscreteKeys& gtsam::DiscreteKeys::operator& ( const DiscreteKey key)
inline

Add a key (non-const!)

Definition at line 72 of file DiscreteKey.h.

◆ operator&() [2/2]

DiscreteKeys& gtsam::DiscreteKeys::operator& ( const DiscreteKeys keys)
inline

Add multiple keys (non-const!)

Definition at line 78 of file DiscreteKey.h.

◆ print()

void gtsam::DiscreteKeys::print ( const std::string &  s = "",
const KeyFormatter keyFormatter = DefaultKeyFormatter 
) const

Print the keys and cardinalities.

Definition at line 50 of file DiscreteKey.cpp.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:15:21