SyFi
0.3
|
Public Member Functions | |
void | visit (const basic &s) |
void | visit (const symbol &s) |
Public Attributes | |
exhashmap< int > | symbolcount |
Definition at line 1133 of file ginac_tools.cpp.
void SyFi::SymbolCounterVisitor::visit | ( | const basic & | s | ) | [inline] |
Definition at line 1141 of file ginac_tools.cpp.
{
std::cout << "visiting basic " << std::endl;
}
void SyFi::SymbolCounterVisitor::visit | ( | const symbol & | s | ) | [inline] |
Definition at line 1146 of file ginac_tools.cpp.
References SyFi::p.
{ ex e = s; std::cout << "visiting symbol " << e << std::endl; exhashmap<int>::iterator it = symbolcount.find(s); if(it != symbolcount.end()) { std::cout << "found symbol " << e << std::endl; it->second++; } else { std::cout << "adding symbol " << e << std::endl; pair<ex,int> p; p.first = ex(s); p.second = 1; symbolcount.insert(p); } }
exhashmap<int> SyFi::SymbolCounterVisitor::symbolcount |
Definition at line 1139 of file ginac_tools.cpp.
Referenced by SyFi::count_symbols(), and SyFi::extract_symbols().