DHART
|
A set of edge costs for a graph. More...
#include <graph.h>
Public Member Functions | |
EdgeCostSet () | |
Construct an empty edge cost set. More... | |
EdgeCostSet (int size) | |
Create an edge cost set and allocate a specific size. More... | |
int | size () const |
Get the size of this edge matrix. More... | |
void | ResizeIfNeeded (int new_size) |
Resize this edge matrix if needed. More... | |
void | Clear () |
Clear all values from this edge cost set. More... | |
float & | operator[] (int i) |
Index internal values array. More... | |
bool | bounds_check (int i) const |
float | operator[] (int i) const |
Index internal values array. More... | |
float * | GetPtr () |
Get the pointer to the start of this array. More... | |
const float * | GetPtr () const |
Get the pointer to the start of this array. More... | |
Private Attributes | |
std::vector< float > | costs |
Array of costs to be used like eigen's internal indices array. More... | |
A set of edge costs for a graph.
Arrays that can be swapped in and out of the array's indices.
|
inline |
|
inline |
Create an edge cost set and allocate a specific size.
size | Size of this cost set to be preallocated upon construction. |
Definition at line 388 of file graph.h.
References ResizeIfNeeded().
|
inline |
Definition at line 429 of file graph.h.
References size().
Referenced by operator[]().
|
inline |
|
inline |
Get the pointer to the start of this array.
|
inline |
Get the pointer to the start of this array.
|
inline |
Index internal values array.
i | index to get the cost of |
Definition at line 424 of file graph.h.
References bounds_check().
|
inline |
Index internal values array.
i | index to get the cost of |
Definition at line 438 of file graph.h.
References bounds_check().
|
inline |
Resize this edge matrix if needed.
new_size | new size of the array to allocate to |
If size is less than the current size, this function doesn't do anything. All new values are defaulted to NAN.
Definition at line 403 of file graph.h.
Referenced by EdgeCostSet().
|
inline |
Get the size of this edge matrix.
Definition at line 394 of file graph.h.
Referenced by bounds_check(), and ResizeIfNeeded().
|
private |
Array of costs to be used like eigen's internal indices array.
Definition at line 377 of file graph.h.
Referenced by ResizeIfNeeded().