Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

CDB_File::BiIndex::Generator
build the cdbmake files for a bidirectional index

CDB_File::BiIndex::Generator - build the cdbmake files for a bidirectional index


NAME

CDB_File::BiIndex::Generator - build the cdbmake files for a bidirectional index


SYNOPSIS


        use CDB_File::BiIndex::Generator;

        $gen = new CDB_File::BiIndex::Generator "test";

        $gen->add_relation("USA", "London");

        $gen->add_relation("Malawi", "Lilongwe");

        $gen->finish();


DESCRIPTION

A CDB_File::BiIndex is designed to keep pairs of values and be able to look up bi-directional multivalued relations. This package is designed to generate one of these indexes statically using CDB.

At present this package is a complete hack designed simply to output the two lists in the very specific case which I need.


EXAMPLE

Please see the example in the CDB_File::BiIndex documentation. This shows both how to generate and use an index.


METHODS

new


        new (CLASS, database_filenamebase)

        new (CLASS, first_database_filename, second_database_filename)

New opens and sets up the databases ready for writing.


$gen->add_relation( first , second )

Adds a key value pair to the database.


$gen->finish()

Writes the database so that it is ready for use by CDB_BiIndex.


add_list_first / add_list_second ->(key, list_reference)

These functions add an entire set of relations of one string to a list of other strings

add_list_first puts makes the key a key in the first index. add_list_second puts the list in the first index and the key in the second.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy