From: Willem J. A. <wa...@us...> - 2003-05-05 21:39:29
|
Update of /cvsroot/octave/octave-forge/main/symbolic In directory sc8-pr-cvs1:/tmp/cvs-serv11738 Modified Files: ov-ex.h ov-ex.cc Log Message: main/symbolic/ov-ex.h main/symbolic/ov-ex.cc Modified the constructors and the destructor and added a symbol list and symbol reference count. New members are: void assign_symbol_to_list(GiNaC::symbol &sym); class symbol_list_item; static std::vector<symbol_list_item> symbol_list; This is a work-around for the fact that GiNaC can have different symbols with the same string name, while in octave you want a symbol that appears the same to actually be the same. It works great as long as symbols are declared in octave. It is still possible to have same-name symbols that are different to GiNaC, if a symbol goes out of scope in octave without it being defined in octave's workspace. This could be fixed by also keeping reference counts for symbols in expressions. |