13#ifndef REAL_TIME_TRANSPORT_BLOCK_MATRICES_BLOCK_DIAGONAL_CHEB_H
14#define REAL_TIME_TRANSPORT_BLOCK_MATRICES_BLOCK_DIAGONAL_CHEB_H
19#include <SciCore/Definitions.h>
21#include "../RealTimeTransport_export.h"
26class BinaryInputArchive;
27class BinaryOutputArchive;
29class PortableBinaryInputArchive;
30class PortableBinaryOutputArchive;
35template <MatrixOrScalarType T>
44namespace RealTimeTransport
103 const std::function<MatrixType(
int, SciCore::Real)>& f,
107 SciCore::Real epsAbs,
108 SciCore::Real epsRel,
127 const std::function<MatrixType(
int, SciCore::Real)>& f,
131 SciCore::Real epsAbs,
132 SciCore::Real epsRel,
134 tf::Executor& executor,
139 const std::function<MatrixType(
int, SciCore::Real)>& f,
141 const std::vector<SciCore::RealVector>& sections,
142 SciCore::Real epsAbs,
143 SciCore::Real epsRel,
148 const std::function<MatrixType(
int, SciCore::Real)>& f,
150 const std::vector<SciCore::RealVector>& sections,
151 SciCore::Real epsAbs,
152 SciCore::Real epsRel,
154 tf::Executor& executor,
157 BlockDiagonalCheb(std::vector<SciCore::ChebAdaptive<MatrixType>>&& blocks)
noexcept;
209 std::vector<SciCore::RealVector> sections()
const;
211 void serialize(cereal::BinaryInputArchive& archive);
212 void serialize(cereal::BinaryOutputArchive& archive);
213 void serialize(cereal::PortableBinaryInputArchive& archive);
214 void serialize(cereal::PortableBinaryOutputArchive& archive);
218 std::unique_ptr<Impl> _pimpl;
#define REALTIMETRANSPORT_EXPORT
Definition RealTimeTransport_export.h:15
This class represents a parameter dependent block diagonal matrix.
Definition BlockDiagonalCheb.h:54
BlockDiagonalCheb(const std::function< MatrixType(int, SciCore::Real)> &f, int nBlocks, SciCore::Real a, SciCore::Real b, SciCore::Real epsAbs, SciCore::Real epsRel, SciCore::Real hMin, tf::Executor &executor, bool *ok=nullptr)
Creates a piecewise Chebyshev interpolation of the function with in parallel.
bool operator==(const BlockDiagonalCheb &other) const
Equality comparison operator.
BlockDiagonalCheb integrate() const
Computes the integral of the represented function and returns it as a new object.
BlockDiagonalCheb(const std::function< MatrixType(int, SciCore::Real)> &f, int nBlocks, SciCore::Real a, SciCore::Real b, SciCore::Real epsAbs, SciCore::Real epsRel, SciCore::Real hMin, bool *ok=nullptr)
Creates a piecewise Chebyshev interpolation of the function with .
BlockDiagonalCheb & operator=(BlockDiagonalCheb &&other) noexcept
Move assignment operator.
SciCore::Real lowerLimit() const
Lower limit of the interplation interval.
MatrixType operator()(int i, SciCore::Real t) const
Returns block i of the interpolated matrix at time .
BlockDiagonalCheb(const BlockDiagonalCheb &other)
Copy constructor.
BlockDiagonalCheb()
Constructs an empty interpolation object.
BlockDiagonalCheb & operator=(const BlockDiagonalCheb &other)
Copy assignment operator.
SciCore::Real upperLimit() const
Upper limit of the interplation interval.
bool operator!=(const BlockDiagonalCheb &other) const
Inequality comparison operator.
BlockDiagonalCheb(BlockDiagonalCheb &&other) noexcept
Move constructor.
const SciCore::ChebAdaptive< MatrixType > & block(int i) const
Returns the interpolation object for block i.
BlockDiagonalCheb diff() const
Computes the derivative of the represented function and returns it as a new object.
int numBlocks() const noexcept
Returns the number of matrix blocks.
BlockDiagonalMatrix operator()(SciCore::Real t) const
Returns the full interpolated matrix at time .
Represents a block diagonal matrix.
Definition BlockDiagonalMatrix.h:33