Feature #379
Iter for subsets/tuples
Description
Add new iters for subsets/tuples.
[JAA see file ShortTerm/oscar.C
]
Related issues
History
#1
Updated by Anna Maria Bigatti over 10 years ago
- Target version set to CoCoALib-0.99533 Easter14
#2
Updated by John Abbott over 10 years ago
- Target version changed from CoCoALib-0.99533 Easter14 to CoCoALib-0.99534 Seoul14
#3
Updated by John Abbott about 10 years ago
- Target version changed from CoCoALib-0.99534 Seoul14 to CoCoALib-1.0
#4
Updated by Redmine Admin about 9 years ago
- Category set to Data Structures
#5
Updated by John Abbott 7 months ago
- Status changed from New to In Progress
- Assignee set to John Abbott
- Target version changed from CoCoALib-1.0 to CoCoALib-0.99850
- % Done changed from 0 to 40
I did this some time ago: it is in combinatorics.H
.
I think there should be a version which iterates only over subsets of given cardinality: CoCoA-5 can do this, but CoCoALib not.
#6
Updated by John Abbott 7 months ago
- % Done changed from 40 to 60
I have now added a new ctor SubsetIter(n,k)
which iterates over all subsets of cardinality k
.
Still do not have an iterator for tuples.
#7
Updated by John Abbott 5 months ago
- Status changed from In Progress to Feedback
- % Done changed from 60 to 90
I have now added a first impl of TupleIter
following the idea behind SubsetIter
, i.e. the tuples are from the set 0,1,...n-1.
Also added an example, and doc.
#8
Updated by John Abbott 5 months ago
ANNA will test this over the next week :-)
#9
Updated by John Abbott 5 months ago
ANNA have you tested this?
#10
Updated by John Abbott 5 months ago
- Related to Design #1787: Iterator design: compatible with C++STL? Advancing beyond end? added
#11
Updated by Anna Maria Bigatti 5 months ago
John Abbott wrote:
ANNA have you tested this?
I need to find where I wanted to use them: search in examples and tests (in particular code with Eduardo SysReliability, MVT, Taylor)
#12
Updated by Anna Maria Bigatti 4 months ago
- Status changed from Feedback to Closed
- % Done changed from 90 to 100
Tested in ex-Taylor(2). Smooth.
I also added and example (2-subsets in {0,1,2,3}) in ex-combinatoric1.C