#include <SearchGraphNode.hpp>
Public Member Functions | |
SearchGraphNode (std::unique_ptr< Tensor< unsigned >> &value) | |
SearchGraphNode (std::shared_ptr< SearchGraphNode > &parent, std::unique_ptr< Tensor< unsigned >> &value) | |
void | writeToFile (const std::string path, const unsigned fleetSize) const |
Node of the search tree that is created when exploring various car-ride distributions. Each node can traverse its parent tree and create an output file.
|
inline |
Creates a new root node (no parent) containing a value.
[in,out] | value | Tensor value of this node |
|
inline |
Creates a new node associated with a parent tree and containing a value.
[in,out] | parent | parent node |
[in,out] | value | Tensor value of this node |
void SearchGraphNode::writeToFile | ( | const std::string | path, |
const unsigned | fleetSize | ||
) | const |
Writes the value of this node and of all its parents to a specified file.
[in] | path | specified file |
[in] | fleetSize | number of lines the file will contain |
std::fstream::failure | if file couldn't be opened/created |