MicroModelicaCCompiler
4.5.3
|
#include <index.hpp>
Public Member Functions | |
Index () | |
Index (Expression exp) | |
~Index ()=default | |
void | setMap (IR::Expression exp) |
bool | hasMap () const |
bool | operator== (const Index &other) const |
bool | isConstant () const |
int | dimension () |
void | setExp (Expression exp) |
std::string | print () const |
std::string | identifier (bool recursive_use=false) const |
Range | range () const |
Index | revert () const |
Index | replace (bool range_idx=false) const |
Index | replace (Option< Range > range, bool range_idx=false) const |
std::string | usageExp () const |
std::string | modelicaExp () const |
Util::Variable | variable () const |
bool | hasVariable (int dim) |
std::string | variable (int dim) |
bool | hasFactor (int dim) |
int | factor (int dim) |
bool | hasConstant (int dim) |
int | constant (int dim) |
Expression | expression () const |
bool | isEmpty () const |
std::vector< std::string > | variables () |
std::vector< int > | initValues (Option< Range > range) |
Protected Member Functions | |
void | parseIndexes () |
Private Attributes | |
map< int, IndexDefinition > | _indexes |
Expression | _exp |
Friends | |
std::ostream & | operator<< (std::ostream &out, const Index &i) |
|
inline |
Definition at line 94 of file index.hpp.
Referenced by variable().
MicroModelica::IR::Index::Index | ( | Expression | exp | ) |
|
default |
int MicroModelica::IR::Index::constant | ( | int | dim | ) |
Definition at line 236 of file index.cpp.
References MicroModelica::IR::RangeDefinition::_begin, and MicroModelica::IR::RangeDefinition::begin().
int MicroModelica::IR::Index::dimension | ( | ) |
Definition at line 124 of file index.cpp.
Referenced by MicroModelica::IR::VariableUsage::VariableUsage().
Expression MicroModelica::IR::Index::expression | ( | ) | const |
bool MicroModelica::IR::Index::hasVariable | ( | int | dim | ) |
Definition at line 226 of file index.cpp.
Referenced by MicroModelica::IR::VariableUsage::lhs().
string MicroModelica::IR::Index::identifier | ( | bool | recursive_use = false | ) | const |
Definition at line 149 of file index.cpp.
References variable().
Referenced by MicroModelica::IR::QSSModelDepsGenerator::postProcess().
bool MicroModelica::IR::Index::isConstant | ( | ) | const |
Definition at line 134 of file index.cpp.
References _exp.
Referenced by MicroModelica::IR::Equation::setType(), and MicroModelica::IR::VariableUsage::VariableUsage().
bool MicroModelica::IR::Index::isEmpty | ( | ) | const |
Definition at line 238 of file index.cpp.
References MicroModelica::IR::RangeDefinition::_end, and MicroModelica::IR::RangeDefinition::end().
bool MicroModelica::IR::Index::operator== | ( | const Index & | other | ) | const |
string MicroModelica::IR::Index::print | ( | ) | const |
Definition at line 201 of file index.cpp.
Referenced by MicroModelica::IR::JacGenerator::guard().
Range MicroModelica::IR::Index::range | ( | ) | const |
Definition at line 167 of file index.cpp.
Referenced by variable().
Index MicroModelica::IR::Index::replace | ( | bool | range_idx = false | ) | const |
Definition at line 175 of file index.cpp.
Referenced by MicroModelica::IR::DependencyPrinter::endParallelMap(), and variable().
Index MicroModelica::IR::Index::revert | ( | ) | const |
Definition at line 169 of file index.cpp.
Referenced by MicroModelica::IR::DependencyPrinter::endParallelMap().
void MicroModelica::IR::Index::setExp | ( | Expression | exp | ) |
Definition at line 143 of file index.cpp.
References _exp, and MicroModelica::IR::Expression::reference().
void MicroModelica::IR::Index::setMap | ( | IR::Expression | exp | ) |
Variable MicroModelica::IR::Index::variable | ( | ) | const |
Definition at line 160 of file index.cpp.
References _exp, MicroModelica::IR::Expression::expression(), Index(), range(), and replace().
Referenced by identifier().
vector< string > MicroModelica::IR::Index::variables | ( | ) |
|
friend |
|
private |
Definition at line 129 of file index.hpp.
Referenced by isConstant(), setExp(), and variable().
|
private |
Definition at line 128 of file index.hpp.
Referenced by variables().