Peano
Loading...
Searching...
No Matches
CompressedLinearAlgebra.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include "tarch/la/Vector.h"
7#include "tarch/la/Matrix.h"
8
9
10#include <vector>
11
12
13namespace toolbox {
22 namespace multiprecision {
38 template<int Size>
39 std::vector<unsigned char> compress(const tarch::la::Vector<Size,double>& vector, double maxAbsoluteError);
40
41 template<int Rows, int Cols>
42 std::vector<unsigned char> compress(const tarch::la::Matrix<Rows,Cols,double>& matrix, double maxAbsoluteError);
43
48 template<int Size>
49 tarch::la::Vector<Size,double> uncompressVector( const std::vector<unsigned char>& stream );
50
51 template<int Rows, int Cols>
52 tarch::la::Matrix<Rows,Cols,double> uncompressMatrix( const std::vector<unsigned char>& stream );
53 }
54}
55
56
57#include "CompressedLinearAlgebra.cpph"
58
59
Static (i.e.
Definition Matrix.h:42
tarch::la::Matrix< Rows, Cols, double > uncompressMatrix(const std::vector< unsigned char > &stream)
tarch::la::Vector< Size, double > uncompressVector(const std::vector< unsigned char > &stream)
Can't call it decompress only, as the result data type is not part of the signature,...
std::vector< unsigned char > compress(const tarch::la::Vector< Size, double > &vector, double maxAbsoluteError)
Take a vector and compress it into a byte stream.
Simple vector class.
Definition Vector.h:159