Hi Martin,

with the right implementation of cis in Subset, the test now runs in 
reasonable time.

You see, the problem is the multiplication of species.

For 274668 the computation goes up to degree about 36 of Subset.
The Subset CIS is about as expensive as the CIS for SetSpecies.

Ralf

time TestSuited
summary of the test suite:
============================

test cases      : 11
tests           : 166
tests succeeded : 162
tests failed    : 4

real    0m44.297s
user    0m34.176s
sys     0m0.109s




testFunctorialCompose(): () == {
         macro {
                 CS == CombinatorialSpecies;
                 E == SetSpecies;
                 E2 == RestrictedSpecies(E, 2);
                 WP == Subset; -- Times(E, E);
                 P2 == Times(E2, E);
         }
         SimpleGraph(L: LabelType): CS L == FunctorialCompose(WP, P2)(L) 
add;
         import from Integer, Array Integer;
         check(
             SimpleGraph,
             [1, 1, 2, 8, 64, 1024, 32768, 2097152, 268435456, 68719476736],
             [1,1,2,4,11,34,156, 1044, 12346, 274668],
             [...]



<<implementation: Subset>>=
local cis(): CycleIndexSeries == BugWorkaround(
     CycleIndexSeries has with {exponentiate: % -> %}
){
         g: Generator P := generate {
                 import from I, Z, Q, V, T, P;
                 yield 0$P; -- constant term
                 for n:I in 1.. repeat yield [2/(n::Z) , power(n::V, 1)]$P;
         }
         import from DataStream P;
         exponentiate(g :: CycleIndexSeries);
}
cycleIndexSeries: CycleIndexSeries == cis();
@

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to