VehicleType class.
More...
#include <VehicleType.hpp>
VehicleType class.
This class is used to represent a vehicle type. It contains the source and destination nodes, and the transition matrix.
◆ VehicleType()
VehicleType::VehicleType |
( |
int |
src, |
|
|
int |
dst |
|
) |
| |
Create a new VehicleType object.
- Parameters
-
src | The source node. |
dst | The destination node. |
◆ getDestination()
uint16_t VehicleType::getDestination |
( |
| ) |
const |
|
noexcept |
Get the destination node index.
- Returns
- The destination node index.
◆ getSource()
uint16_t VehicleType::getSource |
( |
| ) |
const |
|
noexcept |
Get the source node index.
- Returns
- The source node index.
◆ getTransMatrix()
SparseMatrix< double > const & VehicleType::getTransMatrix |
( |
| ) |
const |
Get the transition matrix.
- Returns
- The transition matrix.
- Exceptions
-
std::runtime_error | If the transition matrix is empty. |
◆ setTransMatrix()
void VehicleType::setTransMatrix |
( |
SparseMatrix< double > & |
matrix | ) |
|
set the transition matrix
Set the transition matrix.
- Parameters
-
transMatrix | The transition matrix. |
The documentation for this class was generated from the following files: