FMT 1.2.0
Forest management tools for forest planning
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
Models::FMTSerializableMatrix Class Reference

Helper for the serialization of an OSI solver interface matrix. More...

#include <FMTSerializableMatrix.h>

Public Member Functions

 FMTSerializableMatrix ()
 Default constructor for FMTSerializableMatrix.
 
 FMTSerializableMatrix (const FMTSerializableMatrix &rhs)
 Copy constructor for FMTSerializableMatrix.
 
FMTSerializableMatrixoperator= (const FMTSerializableMatrix &rhs)
 Copy assignment operator for FMTSerializableMatrix.
 
 FMTSerializableMatrix (const std::shared_ptr< OsiSolverInterface > &solverinterface)
 Construct a serializable matrix from a solver interface, normally used during the saving part of serialization.
 
void setMatrix (std::shared_ptr< OsiSolverInterface > &solverinterface) const
 Set the content of a solver interface matrix, used during the loading part of serialization.
 
 ~FMTSerializableMatrix ()
 Destructor for FMTSerializableMatrix.
 

Friends

class boost::serialization::access
 Serialize the matrix by extracting the OSI solver interface matrix into vectors, for multiprocessing across multiple cpus (pickle in Python).
 

Detailed Description

Helper for the serialization of an OSI solver interface matrix.

Extracts the information from the OSI solver interface matrix into vectors (solutions, bounds, etc.) to allow synchronization, also useful when copying an OSI solver interface with the FMTSolverInterface type.

Constructor & Destructor Documentation

◆ FMTSerializableMatrix() [1/3]

Models::FMTSerializableMatrix::FMTSerializableMatrix ( )

Default constructor for FMTSerializableMatrix.

◆ FMTSerializableMatrix() [2/3]

Models::FMTSerializableMatrix::FMTSerializableMatrix ( const FMTSerializableMatrix rhs)

Copy constructor for FMTSerializableMatrix.

Parameters
[in]rhsthe FMTSerializableMatrix to copy.

◆ FMTSerializableMatrix() [3/3]

Models::FMTSerializableMatrix::FMTSerializableMatrix ( const std::shared_ptr< OsiSolverInterface > &  solverinterface)

Construct a serializable matrix from a solver interface, normally used during the saving part of serialization.

Parameters
[in]solverinterfacethe solver interface.

◆ ~FMTSerializableMatrix()

Models::FMTSerializableMatrix::~FMTSerializableMatrix ( )

Destructor for FMTSerializableMatrix.

Function used to build a shared pointer of a solverinterface passing the message handler to the pointer. Function used to copy a shared pointer of a solverinterface passing the message handler to the pointer to a other shared pointer.

Member Function Documentation

◆ operator=()

FMTSerializableMatrix & Models::FMTSerializableMatrix::operator= ( const FMTSerializableMatrix rhs)

Copy assignment operator for FMTSerializableMatrix.

Parameters
[in]rhsthe FMTSerializableMatrix to copy.
Returns
a reference to this FMTSerializableMatrix.

◆ setMatrix()

void Models::FMTSerializableMatrix::setMatrix ( std::shared_ptr< OsiSolverInterface > &  solverinterface) const

Set the content of a solver interface matrix, used during the loading part of serialization.

Setter of the solvertype of the serializable matrix.

Parameters
[in]solverinterfacethe solver interface.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Serialize the matrix by extracting the OSI solver interface matrix into vectors, for multiprocessing across multiple cpus (pickle in Python).

Template Parameters
Archivethe archive type.
Parameters
[in,out]arthe archive to serialize to or from.
[in]versionthe serialization version.

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