SyFi  0.3
SyFi::SymbolCounterVisitor Class Reference

List of all members.

Public Member Functions

void visit (const basic &s)
void visit (const symbol &s)

Public Attributes

exhashmap< int > symbolcount

Detailed Description

Definition at line 1133 of file ginac_tools.cpp.


Member Function Documentation

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);
                        }
                }

Member Data Documentation

Definition at line 1139 of file ginac_tools.cpp.

Referenced by SyFi::count_symbols(), and SyFi::extract_symbols().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator