Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

14 Interfaces to other software packages
 14.1 Interface to the GAP-package homalg

14 Interfaces to other software packages

simpcomp contains various interfaces to other software packages (see Chapter 13 for file-related export and import formats). In this chapter, some more sophisticated interfaces to other software packages are described.

Note that this chapter is subject to change and extension as it is planned to expand simpcomp's functionality in this area in the course of the next versions.

14.1 Interface to the GAP-package homalg

As of Version 1.5, simpcomp is equipped with an interface to the GAP-package homalg [BR08] by Mohamed Barakat. This allows to use homalg's powerful capabilities in the field of homological algebra to compute topological properties of simplicial complexes.

For the time being, the only functions provided are ones allowing to compute the homology and cohomology groups of simplicial complexes with arbitrary coefficients. It is planned to extend the functionality in future releases of simpcomp. See below for a list of functions that provide an interface to homalg.

14.1-1 SCHomalgBoundaryMatrices
‣ SCHomalgBoundaryMatrices( complex, modulus )( method )

Returns: a list of homalg objects upon success, fail otherwise.

This function computes the boundary operator matrices for the simplicial complex complex with a ring of coefficients as specified by modulus: a value of 0 yields Q-matrices, a value of 1 yields Z-matrices and a value of q, q a prime or a prime power, computes the F_q-matrices.

 gap> SCLib.SearchByName("CP^2 (VT)");
 [ [ 16, "CP^2 (VT)" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCHomalgBoundaryMatrices(c,0);
 [ <A 36 x 9 mutable matrix over an internal ring>, 
   <A 84 x 36 mutable matrix over an internal ring>, 
   <A 90 x 84 mutable matrix over an internal ring>, 
   <A 36 x 90 mutable matrix over an internal ring>, 
   <An unevaluated 0 x 36 zero matrix over an internal ring> ]
 

14.1-2 SCHomalgCoboundaryMatrices
‣ SCHomalgCoboundaryMatrices( complex, modulus )( method )

Returns: a list of homalg objects upon success, fail otherwise.

This function computes the coboundary operator matrices for the simplicial complex complex with a ring of coefficients as specified by modulus: a value of 0 yields Q-matrices, a value of 1 yields Z-matrices and a value of q, q a prime or a prime power, computes the F_q-matrices.

 gap> SCLib.SearchByName("CP^2 (VT)");
 [ [ 16, "CP^2 (VT)" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCHomalgCoboundaryMatrices(c,0);
 [ <A 9 x 36 mutable matrix over an internal ring>, 
   <A 36 x 84 mutable matrix over an internal ring>, 
   <A 84 x 90 mutable matrix over an internal ring>, 
   <A 90 x 36 mutable matrix over an internal ring>, 
   <An unevaluated 36 x 0 zero matrix over an internal ring> ]
 

14.1-3 SCHomalgHomology
‣ SCHomalgHomology( complex, modulus )( method )

Returns: a list of integers upon success, fail otherwise.

This function computes the ranks of the homology groups of complex with a ring of coefficients as specified by modulus: a value of 0 computes the Q-homology, a value of 1 computes the Z-homology and a value of q, q a prime or a prime power, computes the F_q-homology ranks.

Note that if you are interested not only in the ranks of the homology groups, but rather their full structure, have a look at the function SCHomalgHomologyBasis (14.1-4).

 gap> SCLib.SearchByName("K3");
 [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCHomalgHomology(c,0);
 #I  SCHomalgHomologyOp: Q-homology ranks: [ 1, 0, 22, 0, 1 ]
 [ 1, 0, 22, 0, 1 ]
 

14.1-4 SCHomalgHomologyBasis
‣ SCHomalgHomologyBasis( complex, modulus )( method )

Returns: a homalg object upon success, fail otherwise.

This function computes the homology groups (including explicit bases of the modules involved) of complex with a ring of coefficients as specified by modulus: a value of 0 computes the Q-homology, a value of 1 computes the Z-homology and a value of q, q a prime or a prime power, computes the F_q-homology groups.

The k-th homology group hk can be obtained by calling hk:=CertainObject(homology,k);, where homology is the homalg object returned by this function. The generators of hk can then be obtained via GeneratorsOfModule(hk);.

Note that if you are only interested in the ranks of the homology groups, then it is better to use the funtion SCHomalgHomology (14.1-3) which is way faster.

 gap> SCLib.SearchByName("K3");
 [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCHomalgHomologyBasis(c,0);
 #I  SCHomalgHomologyBasisOp: constructed Q-homology groups.
 <A graded homology object consisting of 5 left modules at degrees [ 0 .. 4 ]>
 

14.1-5 SCHomalgCohomology
‣ SCHomalgCohomology( complex, modulus )( method )

Returns: a list of integers upon success, fail otherwise.

This function computes the ranks of the cohomology groups of complex with a ring of coefficients as specified by modulus: a value of 0 computes the Q-cohomology, a value of 1 computes the Z-cohomology and a value of q, q a prime or a prime power, computes the F_q-cohomology ranks.

Note that if you are interested not only in the ranks of the cohomology groups, but rather their full structure, have a look at the function SCHomalgCohomologyBasis (14.1-6).

 gap> SCLib.SearchByName("K3");
 [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCHomalgCohomology(c,0);
 #I  SCHomalgCohomologyOp: Q-cohomology ranks: [ 1, 0, 22, 0, 1 ]
 [ 1, 0, 22, 0, 1 ]
 

14.1-6 SCHomalgCohomologyBasis
‣ SCHomalgCohomologyBasis( complex, modulus )( method )

Returns: a homalg object upon success, fail otherwise.

This function computes the cohomology groups (including explicit bases of the modules involved) of complex with a ring of coefficients as specified by modulus: a value of 0 computes the Q-cohomology, a value of 1 computes the Z-cohomology and a value of q, q a prime or a prime power, computes the F_q-homology groups.

The k-th cohomology group ck can be obtained by calling ck:=CertainObject(cohomology,k);, where cohomology is the homalg object returned by this function. The generators of ck can then be obtained via GeneratorsOfModule(ck);.

Note that if you are only interested in the ranks of the cohomology groups, then it is better to use the funtion SCHomalgCohomology (14.1-5) which is way faster.

 gap> SCLib.SearchByName("K3");
 [ [ 7648, "K3_16" ], [ 7649, "K3_17" ] ]
 gap> c:=SCLib.Load(last[1][1]);;
 gap> SCHomalgCohomologyBasis(c,0);
 #I  SCHomalgCohomologyBasisOp: constructed Q-cohomology groups.
 <A graded cohomology object consisting of 5 left modules at degrees 
 [ 1 .. 5 ]>
 
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Bib Ind

generated by GAPDoc2HTML