Class TraceBuffer

Inheritance Relationships

Base Type

  • public std::list< TraceWithBuffer >

Class Documentation

class TraceBuffer : public std::list<TraceWithBuffer>

Represents a buffer of a search Trace tree, i.e. a set of traces each representing a possible path for the car to take. It provides methods to prune the possibilities and other useful functionality.

Public Functions

TraceBuffer(const Params::WayComputer::Search &params)
void prune()

Prunes the buffer by removing full Trace(s) that are shorter than the best.

void setEdgeAsDefinitive(const Edge &nextEdge)

Adds the next edge to the definitive path.

Parameters:

nextEdge[in] represents the next valid Edge that should be part of the definitive path

TraceWithBuffer bestTraceWithBuffer() const

Returns the best TraceWithBuffer (according to Trace::operator<). WARNING, if empty, returns an empty Trace!

Trace bestTrace() const

Returns the best Trace (according to Trace::operator<). WARNING, if empty, returns an empty Trace!

size_t height() const

Returns size of the best Trace in the buffer. WARNING, implementation correctness depends on bestTrace impl.