Hi Thomas,

what about just using Aldor?

Put the following file into the combinat directory, just where you 
called "make". I assume that you use trunk and not iso-experiments.
However, of course, you can do similar things with Martin's branch, too.

Say

   make VARIANTSTOBUILD=debug cs

and execute with

   csd

As for interpretation of the output of graphs...

Graphs: 8 [1,2,3]
1s Subset([], [([1,2], [3]),([1,3], [2]),([2,3], [1])])
2s Subset([([1,2], [3])], [([1,3], [2]),([2,3], [1])])
3s Subset([([1,3], [2])], [([1,2], [3]),([2,3], [1])])
4s Subset([([1,2], [3]),([1,3], [2])], [([2,3], [1])])
5s Subset([([2,3], [1])], [([1,2], [3]),([1,3], [2])])
6s Subset([([1,2], [3]),([2,3], [1])], [([1,3], [2])])
7s Subset([([1,3], [2]),([2,3], [1])], [([1,2], [3])])
8s Subset([([1,2], [3]),([1,3], [2]),([2,3], [1])], [])

There are 8 graphs with labels 1, 2, 3.
Line 6s corresponds to the (labelled) graph having edges (1,2) and (2,3).

The output needs improvement, I know.

Hopefully, this helps you to go on.

Ralf

---BEGIN cs.as.nw
%------------------------------------------------------------------
%---
%--- Combinat
%--- Copyright (C) Ralf Hemmecke ([EMAIL PROTECTED])
%--- http://www.hemmecke.de/aldor
%---
%------------------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The Main Executable}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is the executable file that lives outside the library
\libraryname{}.

%CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
<<*>>=
-------------------------------------------------------------------
----
---- Combinat
---- Copyright (C) Ralf Hemmecke ([EMAIL PROTECTED])
---- http://www.hemmecke.de/aldor
----
-------------------------------------------------------------------

#include "combinat"
#include "aldorio"

<<definitions>>

-- The call to the commands below.
combinat(arguments$CommandLine);
@
%$
%TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT



%CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
<<definitions>>=
macro {
         CS == CombinatorialSpecies;
         E == SetSpecies;
         E2 == RestrictedSpecies(E, 2);
         WP == Subset;
         P2 == Times(E2, E);
}

import from Z;

KSubset(L: LabelType, k: Integer): CS L == RestrictedSpecies(Subset, 
k)(L) add;
SimpleGraph(L: LabelType): CS L == FunctorialCompose(WP, P2)(L) add;


struc(text: String, S: CS Z, labels: SetSpecies Z): () == {
         import from S;
         egs: ExponentialGeneratingSeries := generatingSeries$S;
         stdout << text << ": " << count(egs, #labels);
         stdout << " " << labels << newline;
         g: Generator S := structures labels;
         for i in 1.. for s in g repeat stdout << i << "s " << s << newline;
}

types(text: String, S: CS Z, labels: SetSpecies Z): () == {
         import from S;
         ogs: OrdinaryGeneratingSeries := isomorphismTypeGeneratingSeries$S;
         stdout << text << ": " << count(ogs, #labels);
         stdout << " " << labels << newline;
         g: Generator S := isomorphismTypes labels;
         for i in 1.. for s in g repeat stdout << i << "i " << s << newline;
}

out(text: String, S: CS Z, labels: SetSpecies Z): () == {
         struc(text, S, labels);
         types(text, S, labels);
}

xseries(text: String, S: with {count: (%, I) -> Z}, s: S, n: I == 10): 
() == {
         import from I, List Z;
         stdout << "n = " << n << newline;
         stdout << [count(s, i) for i: I in 0..n] << newline;
}

macro {
         EGS == ExponentialGeneratingSeries;
         OGS == OrdinaryGeneratingSeries;
}

eseries(text: String, F: CS Z, n: I == 10): () == {
         stdout << "generating series:"  << text << newline;
         xseries(text, EGS, generatingSeries$F, n);
}
oseries(text: String, F: CS Z, n: I == 10): () == {
         stdout << "isomorphismtype generating series: " << text << newline;
         xseries(text, OGS, isomorphismTypeGeneratingSeries$F, n);
}

series(text: String, F: CS Z, ne: I == 10, no: I == 10): () == {
         eseries(text, F, ne);
         oseries(text, F, no);
}

combinat(args: Array String): () == {
         import from List Z;
         stdout << "I am here" << newline;
         labels: SetSpecies Z := set [i for i in 1..5];
         out("2-set", E2 Z, labels);
         out("2-set", E2 Z, set [1, 2]);
         out("2-subsets", KSubset(Z, 2), set [1, 2]);
         out("2-subsets", KSubset(Z, 2), labels);
         out("5-subsets", KSubset(Z, 5), labels);
         -- trunc cannot yet compute isotypes
         struc("Graphs", SimpleGraph Z, set [1, 2]);
         struc("Graphs", SimpleGraph Z, set [1, 2, 3]);
         struc("Graphs", SimpleGraph Z, labels);

         series("Permutation", Permutation Z);
         series("2-Subset", KSubset(Z, 2));
         series("4-Subset", KSubset(Z, 4));
         series("Graph", SimpleGraph Z, no==machine(9));
}

@
%$
%TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT

---END cs.as.nw

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Aldor-combinat-devel mailing list
Aldor-combinat-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/aldor-combinat-devel

Reply via email to