Dynamical system model
Loading...
Searching...
No Matches
dsm::Itinerary< Id > Class Template Reference

The Itinerary class represents an itinerary in the network. More...

#include <Itinerary.hpp>

Public Member Functions

 Itinerary (Id id, Id destination)
 Construct a new Itinerary object.
 
 Itinerary (Id id, Id destination, SparseMatrix< Id, bool > path)
 Construct a new Itinerary<Id>:: Itinerary object.
 
void setDestination (Id destination)
 Set the itinerary's destination.
 
void setPath (SparseMatrix< Id, bool > path)
 Set the itinerary's path.
 
Id id () const
 Get the itinerary's id.
 
Id destination () const
 Get the itinerary's destination.
 
const SparseMatrix< Id, bool > & path () const
 Get the itinerary's path.
 

Detailed Description

template<typename Id>
requires (std::unsigned_integral<Id>)
class dsm::Itinerary< Id >

The Itinerary class represents an itinerary in the network.

Template Parameters
IdThe type of the itinerary's id. It must be an unsigned integral type.

Constructor & Destructor Documentation

◆ Itinerary() [1/2]

template<typename Id >
requires (std::unsigned_integral<Id>)
dsm::Itinerary< Id >::Itinerary ( Id id,
Id destination )

Construct a new Itinerary object.

Parameters
destinationThe itinerary's destination

◆ Itinerary() [2/2]

template<typename Id >
requires (std::unsigned_integral<Id>)
dsm::Itinerary< Id >::Itinerary ( Id id,
Id destination,
SparseMatrix< Id, bool > path )

Construct a new Itinerary<Id>:: Itinerary object.

Parameters
destinationThe itinerary's destination
pathAn adjacency matrix made by a SparseMatrix representing the itinerary's path

Member Function Documentation

◆ destination()

template<typename Id >
Id dsm::Itinerary< Id >::destination ( ) const
inline

Get the itinerary's destination.

Returns
Id, The itinerary's destination

◆ id()

template<typename Id >
Id dsm::Itinerary< Id >::id ( ) const
inline

Get the itinerary's id.

Returns
Id, The itinerary's id

◆ path()

template<typename Id >
const SparseMatrix< Id, bool > & dsm::Itinerary< Id >::path ( ) const
inline

Get the itinerary's path.

Returns
SparseMatrix<Id, bool>, An adjacency matrix made by a SparseMatrix representing the itinerary's path

◆ setDestination()

template<typename Id >
requires (std::unsigned_integral<Id>)
void dsm::Itinerary< Id >::setDestination ( Id destination)

Set the itinerary's destination.

Parameters
destinationThe itinerary's destination

◆ setPath()

template<typename Id >
requires (std::unsigned_integral<Id>)
void dsm::Itinerary< Id >::setPath ( SparseMatrix< Id, bool > path)

Set the itinerary's path.

Parameters
pathAn adjacency matrix made by a SparseMatrix representing the itinerary's path
Exceptions
std::invalid_argument,ifthe itinerary's source or destination is not in the path's

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