Go to the documentation of this file.
38 #ifndef __SIM_LINEAR_SOLVER_HH__
39 #define __SIM_LINEAR_SOLVER_HH__
64 assert(this->
eq.size() == rhs.
eq.size());
68 for (
unsigned i = 0;
i < res.
eq.size();
i++)
69 res.
eq[
i] = this->eq[
i] + rhs.
eq[
i];
84 assert(unkw <
eq.size());
90 std::ostringstream oss;
91 for (
unsigned i = 0;
i <
eq.size();
i++) {
95 if (
i !=
eq.size() - 1)
103 unsigned cnt()
const {
return eq.size() - 1; }
115 for (
unsigned i = 0;
i < unknowns;
i++)
127 r +=
eq.toStr() +
"\n";
std::vector< double > solve() const
LinearEquation operator+(const LinearEquation &rhs)
LinearSystem(unsigned unknowns)
std::vector< double > eq
Coefficients.
LinearEquation & operator[](unsigned eq)
std::string toStr() const
std::string toStr() const
This class describes a linear equation with constant coefficients.
LinearEquation(unsigned unknowns)
std::vector< LinearEquation > matrix
double & operator[](unsigned unkw)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
LinearEquation & operator*=(const double cnt)
Generated on Sun Jul 30 2023 01:56:59 for gem5 by doxygen 1.8.17