Feature #1470
Updated by John Abbott almost 4 years ago
Make a class so that indexed indets from a polyring can be used with their "natural" indexes (rather than, say, c++ vector indexes).
<pre>
PolyRing P = NewPolyRing(RingQQ(), SymbolRange("x",1,4));
IndexedIndet x(P,"x");
cout << x(3) << endl; // prints x[3]
</pre>
Note that square brackets can be overloaded, but only with a single arg.
Round brackets can be overloaded with several args -- I suggest overloads for 1,2,3 @long@ @long@s and @vector<long>@
<pre>
PolyRing P = NewPolyRing(RingQQ(), SymbolRange("x",1,4));
IndexedIndet x(P,"x");
cout << x(3) << endl; // prints x[3]
</pre>
Note that square brackets can be overloaded, but only with a single arg.
Round brackets can be overloaded with several args -- I suggest overloads for 1,2,3 @long@ @long@s and @vector<long>@