RideDistributor  0.0.1
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Public Member Functions | List of all members
SearchGraphNode Class Reference

#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
 

Detailed Description

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.

Constructor & Destructor Documentation

SearchGraphNode::SearchGraphNode ( std::unique_ptr< Tensor< unsigned >> &  value)
inline

Creates a new root node (no parent) containing a value.

Parameters
[in,out]valueTensor value of this node
SearchGraphNode::SearchGraphNode ( std::shared_ptr< SearchGraphNode > &  parent,
std::unique_ptr< Tensor< unsigned >> &  value 
)
inline

Creates a new node associated with a parent tree and containing a value.

Parameters
[in,out]parentparent node
[in,out]valueTensor value of this node

Member Function Documentation

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.

Parameters
[in]pathspecified file
[in]fleetSizenumber of lines the file will contain
Exceptions
std::fstream::failureif file couldn't be opened/created

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