write_bb_file(KM_fname, bb_fname, lambda, from, len);

This function write a base-block-file for the specified solutions of the given KM-file. This is a file containing only the base blocks. The file is created with the name given in bb_fname. The solution vectors for the specified value of lambda and in the interval [from...from+len-1] are transferred into the base-block-file. The base-block file does not contain information about the group so it should always be used in conjunction with other files. For example, the database creation routine gets the base-block-file together with a file containing generators for the group as its input.

The base-block-file can be used as input for the database of incidence systems maintained by DISCRETA. This routine is called from transversal_of_isomorphism_types.

A typical base-block-file containes three parts: a header, a body and a footer. The header and footer are one line each. The header consists of three integers, v, nb_base_blocks, k. v is the number of points of the designs, nb_base_block is the number of base blocks for each design and k is the blocksize. Note that we can handle even the case where the number of base blocks is not constant. If nb_base_blocks is -1 in the header, the number of base-blocks must appear in the body (see below).

In the body we have one block for each design. This block consists of nb_base_blocks rows listing the base blocks each as a k-subset of integers in [1...v]. If nb_base_blocks is -1 in the header, the number of base blocks appears just before the first base block for each of the designs.

The footer consists of a -1.

A typical base-block file is the following:

21 -1 3

4
1 2 20 
1 5 14 
1 6 16 
1 8 15 


4
1 2 20 
1 5 14 
1 6 12 
1 8 15 



-1

Example:



geo_db_build_from_bb(generators_fname, bb_fname, db_prefix, f_create);

This function is used to build a database of incidence geometries. The incidence geometries are in base-block-format, which is described above. The file generators_fname contains generators for a permutation group on v points and is used to span the design (the degree of the group must be the same as the number of points specified in the base-block-file). The string db_prefix is used as a prefix to the names of files of the database. The database has two files,

(db_prefix)geo_by_base_blocks.db
(db_prefix)geo_by_base_blocks.idx
The .db file contains the database, that is, the information about the geometries. The .idx-file provides a Bayer-tree and is used to access the data. Note that the .db file is transferable between different Unix systems (little-endian/big-endian). One can reconstruct the .idx from the .db file.

The flag f_create determines whether or not the database shall be created at the beginning of this call (you must create the database the first time you are using it). Otherwise, if there already exists a database of geometries (with the same db_prefix and the the same parameters of designs) then the geometries are only added to the existing ones. In any case, geometries are only added if they are not already contained in the database (this means if there is no isomorphic copy in the database).

During the process of adding geometries, this function gives id-s to the datasets. Each new geometry gets a new id. This id is the number of the geometrie in the base-block-file and can be used later on for determining the transversal of designs.

This function is used for transversal_of_isomorphism_types().

Example:



geo_db_get_ids(db_prefix);

This function retrieves all ids of geometries contained in the database. See geo_db_build_from_bb for the meaning of these numbers.

Example:






Back to the DISCRETA-GAP interface
Back to the typical GAP-session
Last updated: July 26, 1999, Evi Haberberger