8template<
typename ValueType>
21template<
typename ValueType>
36 bool keepZeros =
false);
66 mutable std::shared_ptr<std::optional<SparseMatrix<ValueType>>> backwardTransitions;
BackwardTransitionCache(SparseMatrix< ValueType > const &forwardTransitionMatrix, bool keepZeros=false)
BackwardTransitionCache(BackwardTransitionCache const &)=default
bool isCached() const
Retrieves whether the backward transitions are currently cached.
BackwardTransitionCache(BackwardTransitionCache &&)=default
BackwardTransitionCache()=delete
BackwardTransitionCache & operator=(BackwardTransitionCache &&)=delete
void clearCache() const
Clears the cache (for this and all copies of this cache).
BackwardTransitionCache & operator=(BackwardTransitionCache const &)=delete
SparseMatrix< ValueType > const & get() const
Retrieves the backward transitions.
A class that holds a possibly non-square matrix in the compressed row storage format.