Project

General

Profile

Feature #1470

Get indexed indets from a polyring

Added by John Abbott almost 4 years ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
New Function
Target version:
Start date:
25 Jun 2020
Due date:
% Done:

0%

Estimated time:
Spent time:

Description

Make a class so that indexed indets from a polyring can be used with their "natural" indexes (rather than, say, c++ vector indexes).

  PolyRing P = NewPolyRing(RingQQ(), SymbolRange("x",1,4));
  IndexedIndet x(P,"x");
  cout << x(3) << endl; // prints x[3]

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 and vector<long>


Related issues

Related to CoCoA-5 - Feature #1469: Get indexed indets from a polyringNew2020-06-25

History

#1 Updated by John Abbott almost 4 years ago

  • Related to Feature #1469: Get indexed indets from a polyring added

#2 Updated by John Abbott almost 4 years ago

  • Description updated (diff)

As usual, indexes should be of type long (no need for BigInt).

It seems reasonable to allow a "short-cut" for up to 3 indexes; certainly 1 and 2, but why not 3 as well?

Probably not worth overloading operator[]; it might be confusing to a C++ reader (who would think of a vector),
and it works only for 1 index, while operator() can be made more flexible.

#3 Updated by John Abbott about 2 months ago

  • Target version changed from CoCoALib-0.99850 to CoCoALib-0.99900

Also available in: Atom PDF