Go to the documentation of this file.
38 #ifndef __SIM_LINEAR_SOLVER_HH__
39 #define __SIM_LINEAR_SOLVER_HH__
60 assert(this->
eq.size() == rhs.
eq.size());
64 for (
unsigned i = 0;
i < res.
eq.size();
i++)
65 res.
eq[
i] = this->eq[
i] + rhs.
eq[
i];
80 assert(unkw <
eq.size());
86 std::ostringstream oss;
87 for (
unsigned i = 0;
i <
eq.size();
i++) {
91 if (
i !=
eq.size() - 1)
99 unsigned cnt()
const {
return eq.size() - 1; }
110 for (
unsigned i = 0;
i < unknowns;
i++)
122 r +=
eq.toStr() +
"\n";
std::vector< double > eq
Coefficients.
LinearSystem(unsigned unknowns)
This class describes a linear equation with constant coefficients.
std::vector< double > solve() const
std::string toStr() const
LinearEquation & operator[](unsigned eq)
LinearEquation & operator*=(const double cnt)
LinearEquation(unsigned unknowns)
LinearEquation operator+(const LinearEquation &rhs)
std::vector< LinearEquation > matrix
std::string toStr() const
double & operator[](unsigned unkw)
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17