ajindex.c
Open a b+tree index file and initialise a cache object
Synopsis
Prototype
AjPBtcache ajBtreeCacheNewC (
const char* file,
const char* ext,
const char* idir,
const char* mode,
ajint pagesize,
ajint order,
ajint fill,
ajint level,
ajint cachesize
);
| Type | Name | Read/Write | Description |
| const char* | file | Input | name of file |
| const char* | ext | Input | extension of file |
| const char* | idir | Input | index file directory |
| const char* | mode | Input | opening mode |
| ajint | pagesize | Input | pagesize |
| ajint | order | Input | Tree order |
| ajint | fill | Input | Number of entries per bucket |
| ajint | level | Input | level of tree |
| ajint | cachesize | Input | size of cache |
| AjPBtcache | | RETURN | initialised disc block cache structure |
Input
| file: | (Input) | name of file |
| ext: | (Input) | extension of file |
| idir: | (Input) | index file directory |
| mode: | (Input) | opening mode |
| pagesize: | (Input) | pagesize |
| order: | (Input) | Tree order |
| fill: | (Input) | Number of entries per bucket |
| level: | (Input) | level of tree |
| cachesize: | (Input) | size of cache |
Returns
| AjPBtcache: | initialised disc block cache structure |
Description
Open a b+tree index file and initialise a cache object
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Close a b+tree cache
Synopsis
Prototype
void ajBtreeCacheDel (
AjPBtcache* thys
);
| Type | Name | Read/Write | Description |
| AjPBtcache* | thys | Output | list of files to read |
| void | | RETURN | |
Output
| thys: | (Output) | list of files to read |
Returns
Description
Close a b+tree cache
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Get a pointer to a disc cache page
Synopsis
Prototype
AjPBtpage ajBtreeCacheRead (
AjPBtcache cache,
ajlong pageno
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Output | cache |
| ajlong | pageno | Input | page number |
| AjPBtpage | | RETURN | disc cache page pointer |
Input
| pageno: | (Input) | page number |
Output
Returns
| AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a disc cache page
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Sync all dirty cache pages
Synopsis
Prototype
void ajBtreeCacheSync (
AjPBtcache cache,
ajlong rootpage
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| ajlong | rootpage | Input | root page |
| void | | RETURN | |
Input
| rootpage: | (Input) | root page |
Input & Output
Returns
Description
Sync all dirty cache pages
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Get a pointer to a disc cache page for writing
Synopsis
Prototype
AjPBtpage ajBtreeCacheWrite (
AjPBtcache cache,
ajlong pageno
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Output | cache |
| ajlong | pageno | Input | page number |
| AjPBtpage | | RETURN | disc cache page pointer |
Input
| pageno: | (Input) | page number |
Output
Returns
| AjPBtpage: | disc cache page pointer |
Description
Get a pointer to a disc cache page for writing
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Create and write an empty root node. Set it as root, write it to
disc and then lock the page in the disc cache.
The root node is at block 0L
Synopsis
Prototype
void ajBtreeCreateRootNode (
AjPBtcache cache,
ajlong rootpage
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Output | cache |
| ajlong | rootpage | Input | root block |
| void | | RETURN | |
Input
| rootpage: | (Input) | root block |
Output
Returns
Description
Create and write an empty root node. Set it as root, write it to
disc and then lock the page in the disc cache.
The root node is at block 0L
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeFindInsert (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key to search for |
| AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
| key: | (Input) | key to search for |
Input & Output
Returns
| AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Constructor for index bucket ID informationn
Synopsis
Prototype
AjPBtId ajBtreeIdNew (
void
);
| Type | Name | Read/Write | Description |
| AjPBtId | | RETURN | Index ID object |
Returns
Description
Constructor for index bucket ID informationn
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Destructor for index bucket ID information
Synopsis
Prototype
void ajBtreeIdDel (
AjPBtId* thys
);
| Type | Name | Read/Write | Description |
| AjPBtId* | thys | Output | index ID object |
| void | | RETURN | |
Output
| thys: | (Output) | index ID object |
Returns
Description
Destructor for index bucket ID information
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Insert an ID structure into the tree
Synopsis
Prototype
void ajBtreeInsertId (
AjPBtcache cache,
const AjPBtId id
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPBtId | id | Input | Id object |
| void | | RETURN | pointer to a page |
Input
Input & Output
Returns
Description
Insert an ID structure into the tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Get an ID structure from a leaf node given a key
Synopsis
Prototype
AjPBtId ajBtreeIdFromKey (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key |
| AjPBtId | | RETURN | pointer to an ID structure or NULL if not found |
Input
Input & Output
Returns
| AjPBtId: | pointer to an ID structure or NULL if not found |
Description
Get an ID structure from a leaf node given a key
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Write B+ tree parameters to file
Synopsis
Prototype
void ajBtreeWriteParams (
const AjPBtcache cache,
const char* fn,
const char* ext,
const char* idir
);
| Type | Name | Read/Write | Description |
| const AjPBtcache | cache | Input | cache |
| const char* | fn | Input | file name |
| const char* | ext | Input | index file extension name |
| const char* | idir | Input | index file directory |
| void | | RETURN | |
Input
| cache: | (Input) | cache |
| fn: | (Input) | file name |
| ext: | (Input) | index file extension name |
| idir: | (Input) | index file directory |
Returns
Description
Write B+ tree parameters to file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Read B+ tree parameters from file
Synopsis
Prototype
void ajBtreeReadParams (
const char* fn,
const char* ext,
const char* idir,
ajint* order,
ajint* nperbucket,
ajint* pagesize,
ajint* level,
ajint* cachesize,
ajint* sorder,
ajint* snperbucket,
ajlong* count,
ajint* kwlimit
);
| Type | Name | Read/Write | Description |
| const char* | fn | Input | file |
| const char* | ext | Input | file extension |
| const char* | idir | Input | index directory |
| ajint* | order | Output | tree order |
| ajint* | nperbucket | Output | bucket fill |
| ajint* | pagesize | Output | size of pages |
| ajint* | level | Output | depth of tree (0 = root leaf) |
| ajint* | cachesize | Output | cachesize |
| ajint* | sorder | Output | secondary tree order |
| ajint* | snperbucket | Output | secondary bucket fill |
| ajlong* | count | Output | number of primary keywords in the index |
| ajint* | kwlimit | Output | maximum length of a keyword |
| void | | RETURN | |
Input
| fn: | (Input) | file |
| ext: | (Input) | file extension |
| idir: | (Input) | index directory |
Output
| order: | (Output) | tree order |
| nperbucket: | (Output) | bucket fill |
| pagesize: | (Output) | size of pages |
| level: | (Output) | depth of tree (0 = root leaf) |
| cachesize: | (Output) | cachesize |
| sorder: | (Output) | secondary tree order |
| snperbucket: | (Output) | secondary bucket fill |
| count: | (Output) | number of primary keywords in the index |
| kwlimit: | (Output) | maximum length of a keyword |
Returns
Description
Read B+ tree parameters from file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Entry point for ID deletion
Synopsis
Prototype
AjBool ajBtreeDeleteId (
AjPBtcache cache,
const AjPBtId id
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPBtId | id | Input | page |
| AjBool | | RETURN | True if found and deleted |
Input
Input & Output
Returns
| AjBool: | True if found and deleted |
Description
Entry point for ID deletion
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Construct a wildcard search object
Synopsis
Prototype
AjPBtWild ajBtreeWildNew (
AjPBtcache cache,
const AjPStr wild
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPStr | wild | Input | wildcard id prefix (without asterisk) |
| AjPBtWild | | RETURN | b+ tree wildcard object |
Input
| wild: | (Input) | wildcard id prefix (without asterisk) |
Input & Output
Returns
| AjPBtWild: | b+ tree wildcard object |
Description
Construct a wildcard search object
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Destroy a wildcard search object
Synopsis
Prototype
void ajBtreeWildDel (
AjPBtWild* thys
);
| Type | Name | Read/Write | Description |
| AjPBtWild* | thys | Modify | b+ tree wildcard structure |
| void | | RETURN | |
Input & Output
| thys: | (Modify) | b+ tree wildcard structure |
Returns
Description
Destroy a wildcard search object
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Construct a wildcard keyword search object
Synopsis
Prototype
AjPBtKeyWild ajBtreeKeyWildNew (
AjPBtcache cache,
const AjPStr wild
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPStr | wild | Input | wildcard keyword prefix (without asterisk) |
| AjPBtKeyWild | | RETURN | b+ tree wildcard object |
Input
| wild: | (Input) | wildcard keyword prefix (without asterisk) |
Input & Output
Returns
| AjPBtKeyWild: | b+ tree wildcard object |
Description
Construct a wildcard keyword search object
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Destroy a wildcard keyword search object
Synopsis
Prototype
void ajBtreeKeyWildDel (
AjPBtKeyWild* thys
);
| Type | Name | Read/Write | Description |
| AjPBtKeyWild* | thys | Modify | b+ tree wildcard keyword structure |
| void | | RETURN | |
Input & Output
| thys: | (Modify) | b+ tree wildcard keyword structure |
Returns
Description
Destroy a wildcard keyword search object
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Find the node that should contain a key (wild)
Synopsis
Prototype
AjPBtpage ajBtreeFindInsertW (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key to search for |
| AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
| key: | (Input) | key to search for |
Input & Output
Returns
| AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a key (wild)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Wildcard retrieval of entries
Synopsis
Prototype
AjPBtId ajBtreeIdFromKeyW (
AjPBtcache cache,
AjPBtWild wild
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| AjPBtWild | wild | Modify | Wildcard |
| AjPBtId | | RETURN | next matching Id or NULL |
Input & Output
| cache: | (Modify) | cache |
| wild: | (Modify) | Wildcard |
Returns
| AjPBtId: | next matching Id or NULL |
Description
Wildcard retrieval of entries
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Wildcard retrieval of entries
Synopsis
Prototype
void ajBtreeListFromKeyW (
AjPBtcache cache,
const char* key,
AjPList idlist
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | Wildcard key |
| AjPList | idlist | Modify | list of matching AjPBtIds |
| void | | RETURN | |
Input
Input & Output
| cache: | (Modify) | cache |
| idlist: | (Modify) | list of matching AjPBtIds |
Returns
Description
Wildcard retrieval of entries
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Replace an ID structure in a leaf node given a key
Synopsis
Prototype
AjBool ajBtreeReplaceId (
AjPBtcache cache,
const AjPBtId rid
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPBtId | rid | Input | replacement id object |
| AjBool | | RETURN | true if success |
Input
| rid: | (Input) | replacement id object |
Input & Output
Returns
Description
Replace an ID structure in a leaf node given a key
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Read B+ tree entries from file
Synopsis
Prototype
ajint ajBtreeReadEntries (
const char* filename,
const char* indexdir,
const char* directory,
AjPStr** seqfiles,
AjPStr** reffiles
);
| Type | Name | Read/Write | Description |
| const char* | filename | Input | file name |
| const char* | indexdir | Input | index file directory |
| const char* | directory | Input | file directory |
| AjPStr** | seqfiles | Output | sequence file names |
| AjPStr** | reffiles | Output | reference file names (if any) |
| ajint | | RETURN | number of entries |
Input
| filename: | (Input) | file name |
| indexdir: | (Input) | index file directory |
| directory: | (Input) | file directory |
Output
| seqfiles: | (Output) | sequence file names |
| reffiles: | (Output) | reference file names (if any) |
Returns
Description
Read B+ tree entries from file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Get an ID structure from a leaf node given a key
Synopsis
Prototype
void ajBtreeInsertDupId (
AjPBtcache cache,
AjPBtId id
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| AjPBtId | id | Modify | potentially duplicate id |
| void | | RETURN | |
Input & Output
| cache: | (Modify) | cache |
| id: | (Modify) | potentially duplicate id |
Returns
Description
Get an ID structure from a leaf node given a key
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Write B+ tree parameters to file
Synopsis
Prototype
AjPList ajBtreeDupFromKey (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key |
| AjPList | | RETURN | list of matching AjPBtIds or NULL |
Input
Input & Output
Returns
| AjPList: | list of matching AjPBtIds or NULL |
Description
Write B+ tree parameters to file
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Constructor for index bucket keyword information
Synopsis
Prototype
AjPBtPri ajBtreePriNew (
void
);
| Type | Name | Read/Write | Description |
| AjPBtPri | | RETURN | Index ID object |
Returns
Description
Constructor for index bucket keyword information
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Destructor for keyword index primary bucket information
Synopsis
Prototype
void ajBtreePriDel (
AjPBtPri* thys
);
| Type | Name | Read/Write | Description |
| AjPBtPri* | thys | Output | index keyword primary object |
| void | | RETURN | |
Output
| thys: | (Output) | index keyword primary object |
Returns
Description
Destructor for keyword index primary bucket information
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Insert a keyword structure into the tree
Synopsis
Prototype
void ajBtreeInsertKeyword (
AjPBtcache cache,
const AjPBtPri pri
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPBtPri | pri | Input | Id object |
| void | | RETURN | pointer to a page |
Input
Input & Output
Returns
Description
Insert a keyword structure into the tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Get Pri structure matching a keyword
Synopsis
Prototype
AjPBtPri ajBtreePriFromKeyword (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key |
| AjPBtPri | | RETURN | pointer to an Pri structure or NULL if not found |
Input
Input & Output
Returns
| AjPBtPri: | pointer to an Pri structure or NULL if not found |
Description
Get Pri structure matching a keyword
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Open a b+tree index file and initialise a cache object for keyword index
Synopsis
Prototype
AjPBtcache ajBtreeSecCacheNewC (
const char* file,
const char* ext,
const char* idir,
const char* mode,
ajint pagesize,
ajint order,
ajint fill,
ajint level,
ajint cachesize,
ajint sorder,
ajint slevel,
ajint sfill,
ajlong count,
ajint kwlimit
);
| Type | Name | Read/Write | Description |
| const char* | file | Input | name of file |
| const char* | ext | Input | extension of file |
| const char* | idir | Input | index file directory |
| const char* | mode | Input | opening mode |
| ajint | pagesize | Input | pagesize |
| ajint | order | Input | Tree order |
| ajint | fill | Input | Number of entries per bucket |
| ajint | level | Input | level of tree |
| ajint | cachesize | Input | size of cache |
| ajint | sorder | Input | order of secondary tree |
| ajint | slevel | Input | level of secondary tree |
| ajint | sfill | Input | Number of entries per secondary bucket |
| ajlong | count | Input | Number of entries in the index |
| ajint | kwlimit | Input | Max key size |
| AjPBtcache | | RETURN | initialised disc block cache structure |
Input
| file: | (Input) | name of file |
| ext: | (Input) | extension of file |
| idir: | (Input) | index file directory |
| mode: | (Input) | opening mode |
| pagesize: | (Input) | pagesize |
| order: | (Input) | Tree order |
| fill: | (Input) | Number of entries per bucket |
| level: | (Input) | level of tree |
| cachesize: | (Input) | size of cache |
| sorder: | (Input) | order of secondary tree |
| slevel: | (Input) | level of secondary tree |
| sfill: | (Input) | Number of entries per secondary bucket |
| count: | (Input) | Number of entries in the index |
| kwlimit: | (Input) | Max key size |
Returns
| AjPBtcache: | initialised disc block cache structure |
Description
Open a b+tree index file and initialise a cache object for keyword index
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Insert a secondary ID into the tree
Synopsis
Prototype
void ajBtreeInsertSecId (
AjPBtcache cache,
const AjPStr id
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPStr | id | Input | Id |
| void | | RETURN | pointer to a page |
Input
Input & Output
Returns
Description
Insert a secondary ID into the tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
See whether ID already exists in the tree
Synopsis
Prototype
AjBool ajBtreeSecFromId (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key |
| AjBool | | RETURN | true if ID already added |
Input
Input & Output
Returns
| AjBool: | true if ID already added |
Description
See whether ID already exists in the tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeSecFindInsert (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key to search for |
| AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
| key: | (Input) | key to search for |
Input & Output
Returns
| AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Test function: show if a primary tree root block is unlocked
Synopsis
Prototype
void ajBtreeLockTest (
AjPBtcache cache
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| void | | RETURN | |
Input & Output
Returns
Description
Test function: show if a primary tree root block is unlocked
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Read the leaves of a secondary tree
Synopsis
Prototype
AjPList ajBtreeSecLeafList (
AjPBtcache cache,
ajlong rootblock
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| ajlong | rootblock | Input | root page of secondary tree |
| AjPList | | RETURN | List of IDs matching a keyword |
Input
| rootblock: | (Input) | root page of secondary tree |
Input & Output
Returns
| AjPList: | List of IDs matching a keyword |
Description
Read the leaves of a secondary tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Test routine: test for ID within a secondary tree
Synopsis
Prototype
AjBool ajBtreeVerifyId (
AjPBtcache cache,
ajlong rootblock,
const char* id
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| ajlong | rootblock | Input | root page of secondary tree |
| const char* | id | Input | test ID |
| AjBool | | RETURN | true if ID found |
Input
| rootblock: | (Input) | root page of secondary tree |
| id: | (Input) | test ID |
Input & Output
Returns
Description
Test routine: test for ID within a secondary tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Wildcard retrieval of keyword index entries
Synopsis
Prototype
AjPBtId ajBtreeIdFromKeywordW (
AjPBtcache cache,
AjPBtKeyWild wild,
AjPBtcache idcache
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| AjPBtKeyWild | wild | Modify | Wildcard |
| AjPBtcache | idcache | Modify | id cache |
| AjPBtId | | RETURN | next matching Id or NULL |
Input & Output
| cache: | (Modify) | cache |
| wild: | (Modify) | Wildcard |
| idcache: | (Modify) | id cache |
Returns
| AjPBtId: | next matching Id or NULL |
Description
Wildcard retrieval of keyword index entries
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Wildcard retrieval of keyword index entries
Synopsis
Prototype
void ajBtreeListFromKeywordW (
AjPBtcache cache,
const char* key,
AjPBtcache idcache,
AjPList btidlist
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key |
| AjPBtcache | idcache | Modify | id cache |
| AjPList | btidlist | Modify | List of matching AjPBtId entries |
| void | | RETURN | |
Input
Input & Output
| cache: | (Modify) | cache |
| idcache: | (Modify) | id cache |
| btidlist: | (Modify) | List of matching AjPBtId entries |
Returns
Description
Wildcard retrieval of keyword index entries
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Constructor for index bucket ID informationn
Synopsis
Prototype
AjPBtHybrid ajBtreeHybNew (
void
);
| Type | Name | Read/Write | Description |
| AjPBtHybrid | | RETURN | Index ID object |
Returns
| AjPBtHybrid: | Index ID object |
Description
Constructor for index bucket ID informationn
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Destructor for index bucket ID information
Synopsis
Prototype
void ajBtreeHybDel (
AjPBtHybrid* thys
);
| Type | Name | Read/Write | Description |
| AjPBtHybrid* | thys | Output | index ID object |
| void | | RETURN | |
Output
| thys: | (Output) | index ID object |
Returns
Description
Destructor for index bucket ID information
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeHybFindInsert (
AjPBtcache cache,
const char* key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const char* | key | Input | key to search for |
| AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
| key: | (Input) | key to search for |
Input & Output
Returns
| AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Insert an ID structure into the tree
Synopsis
Prototype
void ajBtreeHybInsertId (
AjPBtcache cache,
const AjPBtHybrid hyb
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPBtHybrid | hyb | Input | Id object |
| void | | RETURN | pointer to a page |
Input
Input & Output
Returns
Description
Insert an ID structure into the tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Find the node that should contain a new key for insertion
Synopsis
Prototype
AjPBtpage ajBtreeNumFindInsert (
AjPBtcache cache,
const ajlong key
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const ajlong | key | Input | key to search for |
| AjPBtpage | | RETURN | leaf node where item should be inserted |
Input
| key: | (Input) | key to search for |
Input & Output
Returns
| AjPBtpage: | leaf node where item should be inserted |
Description
Find the node that should contain a new key for insertion
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Insert a file offset key into a secondary tree
Synopsis
Prototype
void ajBtreeInsertNum (
AjPBtcache cache,
const AjPBtNumId num,
AjPBtpage page
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| const AjPBtNumId | num | Input | Id object |
| AjPBtpage | page | Output | cache page |
| void | | RETURN | pointer to a page |
Input
Output
Input & Output
Returns
Description
Insert a file offset key into a secondary tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Free karray and parray arrays for a primary key
Synopsis
Prototype
void ajBtreeFreePriArray (
AjPBtcache cache
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| void | | RETURN | |
Input & Output
Returns
Description
Free karray and parray arrays for a primary key
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Free karray and parray arrays for a secondary key
Synopsis
Prototype
void ajBtreeFreeSecArray (
AjPBtcache cache
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| void | | RETURN | |
Input & Output
Returns
Description
Free karray and parray arrays for a secondary key
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Read the leaves of a secondary hybrid tree
Synopsis
Prototype
void ajBtreeHybLeafList (
AjPBtcache cache,
ajlong rootblock,
const AjPStr idname,
AjPList list
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| ajlong | rootblock | Input | root page of secondary tree |
| const AjPStr | idname | Input | id name |
| AjPList | list | Modify | list to add BtIDs to |
| void | | RETURN | |
Input
| rootblock: | (Input) | root page of secondary tree |
| idname: | (Input) | id name |
Input & Output
| cache: | (Modify) | cache |
| list: | (Modify) | list to add BtIDs to |
Returns
Description
Read the leaves of a secondary hybrid tree
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0
Read the leaves of a primary hybrid tree (requested by EBI services)
Synopsis
Prototype
void ajBtreeDumpHybKeys (
AjPBtcache cache,
ajint dmin,
ajint dmax,
AjPFile outf
);
| Type | Name | Read/Write | Description |
| AjPBtcache | cache | Modify | cache |
| ajint | dmin | Input | minimum number of times the key should appear |
| ajint | dmax | Input | maximum number of times the key should appear |
| AjPFile | outf | Modify | output file |
| void | | RETURN | |
Input
| dmin: | (Input) | minimum number of times the key should appear |
| dmax: | (Input) | maximum number of times the key should appear |
Input & Output
| cache: | (Modify) | cache |
| outf: | (Modify) | output file |
Returns
Description
Read the leaves of a primary hybrid tree (requested by EBI services)
Usage
See source code
Example
In preparation
Errors
See source code
Dependencies
See source code
See Also
See other functions in this section
Availability
In release 5.0.0