ajindex.c


Function ajBtreeCacheNewC

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
);

TypeNameRead/WriteDescription
const char*fileInputname of file
const char*extInputextension of file
const char*idirInputindex file directory
const char*modeInputopening mode
ajintpagesizeInputpagesize
ajintorderInputTree order
ajintfillInputNumber of entries per bucket
ajintlevelInputlevel of tree
ajintcachesizeInputsize of cache
AjPBtcache RETURNinitialised 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

Function ajBtreeCacheDel

Close a b+tree cache

Synopsis

Prototype
void ajBtreeCacheDel (
      AjPBtcache* thys
);

TypeNameRead/WriteDescription
AjPBtcache*thysOutputlist of files to read
void RETURN

Output
thys:(Output)list of files to read
Returns
void:No return value

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

Function ajBtreeCacheRead

Get a pointer to a disc cache page

Synopsis

Prototype
AjPBtpage ajBtreeCacheRead (
      AjPBtcache cache,
      ajlong pageno
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
ajlongpagenoInputpage number
AjPBtpage RETURNdisc cache page pointer

Input
pageno:(Input)page number
Output
cache:(Output)cache
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

Function ajBtreeCacheSync

Sync all dirty cache pages

Synopsis

Prototype
void ajBtreeCacheSync (
      AjPBtcache cache,
      ajlong rootpage
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajlongrootpageInputroot page
void RETURN

Input
rootpage:(Input)root page
Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeCacheWrite

Get a pointer to a disc cache page for writing

Synopsis

Prototype
AjPBtpage ajBtreeCacheWrite (
      AjPBtcache cache,
      ajlong pageno
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
ajlongpagenoInputpage number
AjPBtpage RETURNdisc cache page pointer

Input
pageno:(Input)page number
Output
cache:(Output)cache
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

Function ajBtreeCreateRootNode

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
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
ajlongrootpageInputroot block
void RETURN

Input
rootpage:(Input)root block
Output
cache:(Output)cache
Returns
void:No return value

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

Function ajBtreeFindInsert

Find the node that should contain a new key for insertion

Synopsis

Prototype
AjPBtpage ajBtreeFindInsert (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey to search for
AjPBtpage RETURNleaf node where item should be inserted

Input
key:(Input)key to search for
Input & Output
cache:(Modify)cache
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

Function ajBtreeIdNew

Constructor for index bucket ID informationn

Synopsis

Prototype
AjPBtId ajBtreeIdNew (
      void
);

TypeNameRead/WriteDescription
AjPBtId RETURNIndex ID object

Returns
AjPBtId: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

Function ajBtreeIdDel

Destructor for index bucket ID information

Synopsis

Prototype
void ajBtreeIdDel (
      AjPBtId* thys
);

TypeNameRead/WriteDescription
AjPBtId*thysOutputindex ID object
void RETURN

Output
thys:(Output)index ID object
Returns
void:No return value

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

Function ajBtreeInsertId

Insert an ID structure into the tree

Synopsis

Prototype
void ajBtreeInsertId (
      AjPBtcache cache,
      const AjPBtId id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtIdidInputId object
void RETURNpointer to a page

Input
id:(Input)Id object
Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeIdFromKey

Get an ID structure from a leaf node given a key

Synopsis

Prototype
AjPBtId ajBtreeIdFromKey (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey
AjPBtId RETURNpointer to an ID structure or NULL if not found

Input
key:(Input)key
Input & Output
cache:(Modify)cache
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

Function ajBtreeWriteParams

Write B+ tree parameters to file

Synopsis

Prototype
void ajBtreeWriteParams (
      const AjPBtcache cache,
      const char* fn,
      const char* ext,
      const char* idir
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
const char*fnInputfile name
const char*extInputindex file extension name
const char*idirInputindex file directory
void RETURN

Input
cache:(Input)cache
fn:(Input)file name
ext:(Input)index file extension name
idir:(Input)index file directory
Returns
void:No return value

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

Function ajBtreeReadParams

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
);

TypeNameRead/WriteDescription
const char*fnInputfile
const char*extInputfile extension
const char*idirInputindex directory
ajint*orderOutputtree order
ajint*nperbucketOutputbucket fill
ajint*pagesizeOutputsize of pages
ajint*levelOutputdepth of tree (0 = root leaf)
ajint*cachesizeOutputcachesize
ajint*sorderOutputsecondary tree order
ajint*snperbucketOutputsecondary bucket fill
ajlong*countOutputnumber of primary keywords in the index
ajint*kwlimitOutputmaximum 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
void:No return value

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

Function ajBtreeDeleteId

Entry point for ID deletion

Synopsis

Prototype
AjBool ajBtreeDeleteId (
      AjPBtcache cache,
      const AjPBtId id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtIdidInputpage
AjBool RETURNTrue if found and deleted

Input
id:(Input)page
Input & Output
cache:(Modify)cache
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

Function ajBtreeWildNew

Construct a wildcard search object

Synopsis

Prototype
AjPBtWild ajBtreeWildNew (
      AjPBtcache cache,
      const AjPStr wild
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrwildInputwildcard id prefix (without asterisk)
AjPBtWild RETURNb+ tree wildcard object

Input
wild:(Input)wildcard id prefix (without asterisk)
Input & Output
cache:(Modify)cache
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

Function ajBtreeWildDel

Destroy a wildcard search object

Synopsis

Prototype
void ajBtreeWildDel (
      AjPBtWild* thys
);

TypeNameRead/WriteDescription
AjPBtWild*thysModifyb+ tree wildcard structure
void RETURN

Input & Output
thys:(Modify)b+ tree wildcard structure
Returns
void:No return value

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

Function ajBtreeKeyWildNew

Construct a wildcard keyword search object

Synopsis

Prototype
AjPBtKeyWild ajBtreeKeyWildNew (
      AjPBtcache cache,
      const AjPStr wild
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrwildInputwildcard keyword prefix (without asterisk)
AjPBtKeyWild RETURNb+ tree wildcard object

Input
wild:(Input)wildcard keyword prefix (without asterisk)
Input & Output
cache:(Modify)cache
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

Function ajBtreeKeyWildDel

Destroy a wildcard keyword search object

Synopsis

Prototype
void ajBtreeKeyWildDel (
      AjPBtKeyWild* thys
);

TypeNameRead/WriteDescription
AjPBtKeyWild*thysModifyb+ tree wildcard keyword structure
void RETURN

Input & Output
thys:(Modify)b+ tree wildcard keyword structure
Returns
void:No return value

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

Function ajBtreeFindInsertW

Find the node that should contain a key (wild)

Synopsis

Prototype
AjPBtpage ajBtreeFindInsertW (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey to search for
AjPBtpage RETURNleaf node where item should be inserted

Input
key:(Input)key to search for
Input & Output
cache:(Modify)cache
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

Function ajBtreeIdFromKeyW

Wildcard retrieval of entries

Synopsis

Prototype
AjPBtId ajBtreeIdFromKeyW (
      AjPBtcache cache,
      AjPBtWild wild
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtWildwildModifyWildcard
AjPBtId RETURNnext 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

Function ajBtreeListFromKeyW

Wildcard retrieval of entries

Synopsis

Prototype
void ajBtreeListFromKeyW (
      AjPBtcache cache,
      const char* key,
      AjPList idlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputWildcard key
AjPListidlistModifylist of matching AjPBtIds
void RETURN

Input
key:(Input)Wildcard key
Input & Output
cache:(Modify)cache
idlist:(Modify)list of matching AjPBtIds
Returns
void:No return value

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

Function ajBtreeReplaceId

Replace an ID structure in a leaf node given a key

Synopsis

Prototype
AjBool ajBtreeReplaceId (
      AjPBtcache cache,
      const AjPBtId rid
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtIdridInputreplacement id object
AjBool RETURNtrue if success

Input
rid:(Input)replacement id object
Input & Output
cache:(Modify)cache
Returns
AjBool:true if success

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

Function ajBtreeReadEntries

Read B+ tree entries from file

Synopsis

Prototype
ajint ajBtreeReadEntries (
      const char* filename,
      const char* indexdir,
      const char* directory,
      AjPStr** seqfiles,
      AjPStr** reffiles
);

TypeNameRead/WriteDescription
const char*filenameInputfile name
const char*indexdirInputindex file directory
const char*directoryInputfile directory
AjPStr**seqfilesOutputsequence file names
AjPStr**reffilesOutputreference file names (if any)
ajint RETURNnumber 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
ajint:number of entries

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

Function ajBtreeInsertDupId

Get an ID structure from a leaf node given a key

Synopsis

Prototype
void ajBtreeInsertDupId (
      AjPBtcache cache,
      AjPBtId id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtIdidModifypotentially duplicate id
void RETURN

Input & Output
cache:(Modify)cache
id:(Modify)potentially duplicate id
Returns
void:No return value

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

Function ajBtreeDupFromKey

Write B+ tree parameters to file

Synopsis

Prototype
AjPList ajBtreeDupFromKey (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey
AjPList RETURNlist of matching AjPBtIds or NULL

Input
key:(Input)key
Input & Output
cache:(Modify)cache
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

Function ajBtreePriNew

Constructor for index bucket keyword information

Synopsis

Prototype
AjPBtPri ajBtreePriNew (
      void
);

TypeNameRead/WriteDescription
AjPBtPri RETURNIndex ID object

Returns
AjPBtPri:Index ID object

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

Function ajBtreePriDel

Destructor for keyword index primary bucket information

Synopsis

Prototype
void ajBtreePriDel (
      AjPBtPri* thys
);

TypeNameRead/WriteDescription
AjPBtPri*thysOutputindex keyword primary object
void RETURN

Output
thys:(Output)index keyword primary object
Returns
void:No return value

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

Function ajBtreeInsertKeyword

Insert a keyword structure into the tree

Synopsis

Prototype
void ajBtreeInsertKeyword (
      AjPBtcache cache,
      const AjPBtPri pri
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtPripriInputId object
void RETURNpointer to a page

Input
pri:(Input)Id object
Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreePriFromKeyword

Get Pri structure matching a keyword

Synopsis

Prototype
AjPBtPri ajBtreePriFromKeyword (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey
AjPBtPri RETURNpointer to an Pri structure or NULL if not found

Input
key:(Input)key
Input & Output
cache:(Modify)cache
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

Function ajBtreeSecCacheNewC

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
);

TypeNameRead/WriteDescription
const char*fileInputname of file
const char*extInputextension of file
const char*idirInputindex file directory
const char*modeInputopening mode
ajintpagesizeInputpagesize
ajintorderInputTree order
ajintfillInputNumber of entries per bucket
ajintlevelInputlevel of tree
ajintcachesizeInputsize of cache
ajintsorderInputorder of secondary tree
ajintslevelInputlevel of secondary tree
ajintsfillInputNumber of entries per secondary bucket
ajlongcountInputNumber of entries in the index
ajintkwlimitInputMax key size
AjPBtcache RETURNinitialised 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

Function ajBtreeInsertSecId

Insert a secondary ID into the tree

Synopsis

Prototype
void ajBtreeInsertSecId (
      AjPBtcache cache,
      const AjPStr id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStridInputId
void RETURNpointer to a page

Input
id:(Input)Id
Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeSecFromId

See whether ID already exists in the tree

Synopsis

Prototype
AjBool ajBtreeSecFromId (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey
AjBool RETURNtrue if ID already added

Input
key:(Input)key
Input & Output
cache:(Modify)cache
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

Function ajBtreeSecFindInsert

Find the node that should contain a new key for insertion

Synopsis

Prototype
AjPBtpage ajBtreeSecFindInsert (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey to search for
AjPBtpage RETURNleaf node where item should be inserted

Input
key:(Input)key to search for
Input & Output
cache:(Modify)cache
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

Function ajBtreeLockTest

Test function: show if a primary tree root block is unlocked

Synopsis

Prototype
void ajBtreeLockTest (
      AjPBtcache cache
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
void RETURN

Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeSecLeafList

Read the leaves of a secondary tree

Synopsis

Prototype
AjPList ajBtreeSecLeafList (
      AjPBtcache cache,
      ajlong rootblock
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajlongrootblockInputroot page of secondary tree
AjPList RETURNList of IDs matching a keyword

Input
rootblock:(Input)root page of secondary tree
Input & Output
cache:(Modify)cache
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

Function ajBtreeVerifyId

Test routine: test for ID within a secondary tree

Synopsis

Prototype
AjBool ajBtreeVerifyId (
      AjPBtcache cache,
      ajlong rootblock,
      const char* id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajlongrootblockInputroot page of secondary tree
const char*idInputtest ID
AjBool RETURNtrue if ID found

Input
rootblock:(Input)root page of secondary tree
id:(Input)test ID
Input & Output
cache:(Modify)cache
Returns
AjBool:true if ID found

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

Function ajBtreeIdFromKeywordW

Wildcard retrieval of keyword index entries

Synopsis

Prototype
AjPBtId ajBtreeIdFromKeywordW (
      AjPBtcache cache,
      AjPBtKeyWild wild,
      AjPBtcache idcache
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtKeyWildwildModifyWildcard
AjPBtcacheidcacheModifyid cache
AjPBtId RETURNnext 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

Function ajBtreeListFromKeywordW

Wildcard retrieval of keyword index entries

Synopsis

Prototype
void ajBtreeListFromKeywordW (
      AjPBtcache cache,
      const char* key,
      AjPBtcache idcache,
      AjPList btidlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey
AjPBtcacheidcacheModifyid cache
AjPListbtidlistModifyList of matching AjPBtId entries
void RETURN

Input
key:(Input)key
Input & Output
cache:(Modify)cache
idcache:(Modify)id cache
btidlist:(Modify)List of matching AjPBtId entries
Returns
void:No return value

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

Function ajBtreeHybNew

Constructor for index bucket ID informationn

Synopsis

Prototype
AjPBtHybrid ajBtreeHybNew (
      void
);

TypeNameRead/WriteDescription
AjPBtHybrid RETURNIndex 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

Function ajBtreeHybDel

Destructor for index bucket ID information

Synopsis

Prototype
void ajBtreeHybDel (
      AjPBtHybrid* thys
);

TypeNameRead/WriteDescription
AjPBtHybrid*thysOutputindex ID object
void RETURN

Output
thys:(Output)index ID object
Returns
void:No return value

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

Function ajBtreeHybFindInsert

Find the node that should contain a new key for insertion

Synopsis

Prototype
AjPBtpage ajBtreeHybFindInsert (
      AjPBtcache cache,
      const char* key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const char*keyInputkey to search for
AjPBtpage RETURNleaf node where item should be inserted

Input
key:(Input)key to search for
Input & Output
cache:(Modify)cache
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

Function ajBtreeHybInsertId

Insert an ID structure into the tree

Synopsis

Prototype
void ajBtreeHybInsertId (
      AjPBtcache cache,
      const AjPBtHybrid hyb
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtHybridhybInputId object
void RETURNpointer to a page

Input
hyb:(Input)Id object
Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeNumFindInsert

Find the node that should contain a new key for insertion

Synopsis

Prototype
AjPBtpage ajBtreeNumFindInsert (
      AjPBtcache cache,
      const ajlong key
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const ajlongkeyInputkey to search for
AjPBtpage RETURNleaf node where item should be inserted

Input
key:(Input)key to search for
Input & Output
cache:(Modify)cache
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

Function ajBtreeInsertNum

Insert a file offset key into a secondary tree

Synopsis

Prototype
void ajBtreeInsertNum (
      AjPBtcache cache,
      const AjPBtNumId num,
      AjPBtpage page
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtNumIdnumInputId object
AjPBtpagepageOutputcache page
void RETURNpointer to a page

Input
num:(Input)Id object
Output
page:(Output)cache page
Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeFreePriArray

Free karray and parray arrays for a primary key

Synopsis

Prototype
void ajBtreeFreePriArray (
      AjPBtcache cache
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
void RETURN

Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeFreeSecArray

Free karray and parray arrays for a secondary key

Synopsis

Prototype
void ajBtreeFreeSecArray (
      AjPBtcache cache
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
void RETURN

Input & Output
cache:(Modify)cache
Returns
void:No return value

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

Function ajBtreeHybLeafList

Read the leaves of a secondary hybrid tree

Synopsis

Prototype
void ajBtreeHybLeafList (
      AjPBtcache cache,
      ajlong rootblock,
      const AjPStr idname,
      AjPList list
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajlongrootblockInputroot page of secondary tree
const AjPStridnameInputid name
AjPListlistModifylist 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
void:No return value

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

Function ajBtreeDumpHybKeys

Read the leaves of a primary hybrid tree (requested by EBI services)

Synopsis

Prototype
void ajBtreeDumpHybKeys (
      AjPBtcache cache,
      ajint dmin,
      ajint dmax,
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajintdminInputminimum number of times the key should appear
ajintdmaxInputmaximum number of times the key should appear
AjPFileoutfModifyoutput 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
void:No return value

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