ajindex.c


Function ajBtreeFieldGetLenC

Returns the default indexed name length for a named field

Prototype

ajuint ajBtreeFieldGetLenC (
      const char* nametxt
);

TypeNameRead/WriteDescription
const char*nametxtInputField name
ajuint RETURNField name length

From EMBOSS 6.4.0


Function ajBtreeFieldGetLenS

Returns the default indexed name length for a named field

Prototype

ajuint ajBtreeFieldGetLenS (
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPStrnameInputField name
ajuint RETURNField name length

From EMBOSS 6.4.0


Function ajBtreeFieldGetExtensionC

Returns the default index file extension for a named field

Prototype

const AjPStr ajBtreeFieldGetExtensionC (
      const char* nametxt
);

TypeNameRead/WriteDescription
const char*nametxtInputField name
const AjPStr RETURNFilename extension

From EMBOSS 6.4.0


Function ajBtreeFieldGetExtensionS

Returns the default index file extension for a named field

Prototype

const AjPStr ajBtreeFieldGetExtensionS (
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPStrnameInputField name
const AjPStr RETURNFilename extension

From EMBOSS 6.4.0


Function ajBtreeFieldGetSecondaryC

Returns whether a named field uses a secondary index

Prototype

AjBool ajBtreeFieldGetSecondaryC (
      const char* nametxt
);

TypeNameRead/WriteDescription
const char*nametxtInputField name
AjBool RETURNTrue for a secondary index where indexed terms treturn IDs False for an ID index where terms return file positions.

From EMBOSS 6.4.0


Function ajBtreeFieldGetSecondaryS

Returns whether a named field uses a secondary index

Prototype

AjBool ajBtreeFieldGetSecondaryS (
      const AjPStr name
);

TypeNameRead/WriteDescription
const AjPStrnameInputField name
AjBool RETURNTrue for a secondary index where indexed terms treturn IDs False for an ID index where terms return file positions.

From EMBOSS 6.4.0


Function ajBtreeIdcacheNewC

s** Open a b+tree index file and initialise a cache object

Prototype

AjPBtcache ajBtreeIdcacheNewC (
      const char* filetxt,
      const char* exttxt,
      const char* idirtxt,
      const char* mode,
      AjBool compressed,
      ajuint kwlimit,
      ajuint refcount,
      ajuint pripagesize,
      ajuint secpagesize,
      ajuint pricachesize,
      ajuint seccachesize,
      ajulong pripagecount,
      ajulong secpagecount,
      ajuint order,
      ajuint fill,
      ajuint level,
      ajuint sorder,
      ajuint sfill,
      ajulong count,
      ajulong countall
);

TypeNameRead/WriteDescription
const char*filetxtInputname of file
const char*exttxtInputextension of file
const char*idirtxtInputindex file directory
const char*modeInputopening mode
AjBoolcompressedInputCompressed index flag
ajuintkwlimitInputMax key size
ajuintrefcountInputExtra files for each entry
ajuintpripagesizeInputPrimary pagesize
ajuintsecpagesizeInputSecondary pagesize
ajuintpricachesizeInputsize of primary cache
ajuintseccachesizeInputsize of secondary cache
ajulongpripagecountInputPrimary page count
ajulongsecpagecountInputSecondary page count
ajuintorderInputTree order
ajuintfillInputNumber of entries per bucket
ajuintlevelInputlevel of tree
ajuintsorderInputorder of secondary tree
ajuintsfillInputNumber of entries per secondary bucket
ajulongcountInputNumber of entries in the index
ajulongcountallInputNumber of total entries in the index
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 3.0.0


Function ajBtreeIdcacheNewS

Open a b+tree index file and initialise a cache object

Prototype

AjPBtcache ajBtreeIdcacheNewS (
      const AjPStr file,
      const AjPStr ext,
      const AjPStr idir,
      const char* mode,
      AjBool compressed,
      ajuint refcount,
      ajuint kwlimit,
      ajuint pripagesize,
      ajuint secpagesize,
      ajuint pricachesize,
      ajuint seccachesize,
      ajulong pripagecount,
      ajulong secpagecount,
      ajuint order,
      ajuint fill,
      ajuint level,
      ajuint sorder,
      ajuint sfill,
      ajulong count,
      ajulong countall
);

TypeNameRead/WriteDescription
const AjPStrfileInputname of file
const AjPStrextInputextension of file
const AjPStridirInputindex file directory
const char*modeInputopening mode
AjBoolcompressedInputCompressed index flag
ajuintrefcountInputExtra files for each entry
ajuintkwlimitInputMax key size
ajuintpripagesizeInputPrimary pagesize
ajuintsecpagesizeInputSecondary pagesize
ajuintpricachesizeInputsize of primary cache
ajuintseccachesizeInputsize of secondary cache
ajulongpripagecountInputPrimary page count
ajulongsecpagecountInputSecondary page count
ajuintorderInputTree order
ajuintfillInputNumber of entries per bucket
ajuintlevelInputlevel of tree
ajuintsorderInputorder of secondary tree
ajuintsfillInputNumber of entries per secondary bucket
ajulongcountInputNumber of entries in the index
ajulongcountallInputNumber of total entries in the index
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 6.4.0


Function ajBtreeCacheNewReadC

Open an existing b+tree index file and initialise a cache object

Prototype

AjPBtcache ajBtreeCacheNewReadC (
      const char* filetxt,
      const char* exttxt,
      const char* idirtxt
);

TypeNameRead/WriteDescription
const char*filetxtInputname of file
const char*exttxtInputextension of file
const char*idirtxtInputindex file directory
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 6.4.0


Function ajBtreeCacheNewReadS

Open an existing b+tree index file and initialise a cache object

Prototype

AjPBtcache ajBtreeCacheNewReadS (
      const AjPStr file,
      const AjPStr ext,
      const AjPStr idir
);

TypeNameRead/WriteDescription
const AjPStrfileInputname of file
const AjPStrextInputextension of file
const AjPStridirInputindex file directory
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 6.4.0


Function ajBtreeCacheNewUpdateC

Open an existing b+tree index file for update and initialise a cache object

Prototype

AjPBtcache ajBtreeCacheNewUpdateC (
      const char* filetxt,
      const char* exttxt,
      const char* idirtxt
);

TypeNameRead/WriteDescription
const char*filetxtInputname of file
const char*exttxtInputextension of file
const char*idirtxtInputindex file directory
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 6.4.0


Function ajBtreeCacheNewUpdateS

Open an existing b+tree index file for update and initialise a cache object

Prototype

AjPBtcache ajBtreeCacheNewUpdateS (
      const AjPStr file,
      const AjPStr ext,
      const AjPStr idir
);

TypeNameRead/WriteDescription
const AjPStrfileInputname of file
const AjPStrextInputextension of file
const AjPStridirInputindex file directory
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 6.4.0


Function ajBtreeCacheDel

Close a b+tree cache

Prototype

ajulong ajBtreeCacheDel (
      AjPBtcache* Pthis
);

TypeNameRead/WriteDescription
AjPBtcache*PthisOutputCache object
ajulong RETURNIndex file size

From EMBOSS 3.0.0


Function ajBtreeCacheIsCompressed

Returns true if the index is compressed

Prototype

AjBool ajBtreeCacheIsCompressed (
      const AjPBtcache cache
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
AjBool RETURNTrue if index is compressed

From EMBOSS 6.5.0


Function ajBtreeCacheIsSecondary

Test whether a cache is a secondary index

Prototype

AjBool ajBtreeCacheIsSecondary (
      const AjPBtcache thys
);

TypeNameRead/WriteDescription
const AjPBtcachethysInputCache object
AjBool RETURNTrue if cache is secondary

From EMBOSS 6.4.0


Function ajBtreeCacheStatsOut

Cache statistics for writing a new index

Prototype

void ajBtreeCacheStatsOut (
      AjPFile outf,
      const AjPBtcache cache,
      ajulong* Ppricache,
      ajulong* Pseccache,
      ajulong* Pprireads,
      ajulong* Psecreads,
      ajulong* Ppriwrites,
      ajulong* Psecwrites,
      ajulong* Pprisize,
      ajulong* Psecsize
);

TypeNameRead/WriteDescription
AjPFileoutfModifyoutput file file
const AjPBtcachecacheInputcache object
ajulong*PpricacheModifyNumber of cache reads to date
ajulong*PseccacheModifyNumber of cache reads to date
ajulong*PprireadsModifyNumber of disk reads to date
ajulong*PsecreadsModifyNumber of disk reads to date
ajulong*PpriwritesModifyNumber of disk writes to date
ajulong*PsecwritesModifyNumber of disk writes to date
ajulong*PprisizeModifyNumber of primary cache pages to date
ajulong*PsecsizeModifyNumber of secondary cache pages to date
void RETURN

From EMBOSS 6.4.0


Function ajBtreeCacheRead

Get a pointer to a disc cache page

Prototype

AjPBtpage ajBtreeCacheRead (
      AjPBtcache cache,
      ajulong pagepos
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
ajulongpageposInputpage number
AjPBtpage RETURNdisc cache page pointer

From EMBOSS 6.5.0


Function ajBtreeIdNew

Constructor for index bucket ID information

Prototype

AjPBtId ajBtreeIdNew (
      ajuint refcount
);

TypeNameRead/WriteDescription
ajuintrefcountInputNumber of reference files for each entry
AjPBtId RETURNIndex ID object

From EMBOSS 3.0.0


Function ajBtreeIdDel

Destructor for index bucket ID information

Prototype

void ajBtreeIdDel (
      AjPBtId* thys
);

TypeNameRead/WriteDescription
AjPBtId*thysOutputindex ID object
void RETURN

From EMBOSS 3.0.0


Function ajBtreeIdDelVoid

Destructor for index bucket ID information

Prototype

void ajBtreeIdDelVoid (
      void** voidarg
);

TypeNameRead/WriteDescription
void**voidargOutputIndex ID object, passed as void for use by list and table destructors.
void RETURN

From EMBOSS 6.4.0


Function ajBtreeIdIsMulti

Tests whether an ID object links to multiple entries

Prototype

AjBool ajBtreeIdIsMulti (
      const AjPBtId thys
);

TypeNameRead/WriteDescription
const AjPBtIdthysInputindex ID object
AjBool RETURNTrue if ID object points to duplicated identifiers

From EMBOSS 6.5.0


Function ajBtreeHitNew

Constructor for index hit information

Prototype

AjPBtHit ajBtreeHitNew (
      void
);

TypeNameRead/WriteDescription
AjPBtHit RETURNIndex hit object

From EMBOSS 6.5.0


Function ajBtreeHitNewId

Constructor for index hit information from an existing Btid object

Prototype

AjPBtHit ajBtreeHitNewId (
      const AjPBtId btid
);

TypeNameRead/WriteDescription
const AjPBtIdbtidInputIndex id object
AjPBtHit RETURNIndex hit object

From EMBOSS 6.5.0


Function ajBtreeHitDel

Destructor for index hit information

Prototype

void ajBtreeHitDel (
      AjPBtHit* thys
);

TypeNameRead/WriteDescription
AjPBtHit*thysOutputindex hit object
void RETURN

From EMBOSS 6.5.0


Function ajBtreeHitDelVoid

Destructor for index hit information

Prototype

void ajBtreeHitDelVoid (
      void** voidarg
);

TypeNameRead/WriteDescription
void**voidargOutputIndex hit object, passed as void for use by list and table destructors.
void RETURN

From EMBOSS 6.5.0


Function ajBtreeHitrefNew

Constructor for index reference hit information

Prototype

AjPBtHitref ajBtreeHitrefNew (
      void
);

TypeNameRead/WriteDescription
AjPBtHitref RETURNIndex reference hit object

From EMBOSS 6.5.0


Function ajBtreeHitrefNewId

Constructor for index reference hit information from an existing Btid object

Prototype

AjPBtHitref ajBtreeHitrefNewId (
      const AjPBtId btid
);

TypeNameRead/WriteDescription
const AjPBtIdbtidInputIndex id object
AjPBtHitref RETURNIndex hit object

From EMBOSS 6.5.0


Function ajBtreeHitrefDel

Destructor for index reference hit information

Prototype

void ajBtreeHitrefDel (
      AjPBtHitref* thys
);

TypeNameRead/WriteDescription
AjPBtHitref*thysOutputindex reference hit object
void RETURN

From EMBOSS 6.5.0


Function ajBtreeHitrefDelVoid

Destructor for index reference hit information

Prototype

void ajBtreeHitrefDelVoid (
      void** voidarg
);

TypeNameRead/WriteDescription
void**voidargOutputIndex reference hit object, passed as void for use by list and table destructors.
void RETURN

From EMBOSS 6.5.0


Function ajBtreeDumpKeywords

Read the leaves of a complete keywords tree, returning all identifiers found within a range of total occurrences

Prototype

void ajBtreeDumpKeywords (
      AjPBtcache cache,
      ajuint dmin,
      ajuint dmax,
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajuintdminInputminimum number of times the key should appear
ajuintdmaxInputmaximum number of times the key should appear
AjPFileoutfModifyoutput file
void RETURN

From EMBOSS 6.5.0


Function ajBtreeIdentFetchId

Get an ID structure from a leaf node given an identifier

Prototype

void ajBtreeIdentFetchId (
      AjPBtcache cache,
      const AjPStr key,
      AjPList btidlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputkey
AjPListbtidlistOutputList of ID objects
void RETURN

From EMBOSS 6.5.0


Function ajBtreeIdentFetchHit

Get an ID hit structure from a leaf node given an identifier

Prototype

void ajBtreeIdentFetchHit (
      AjPBtcache cache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputkey
AjPListhitlistOutputList of hit objects
void RETURN

From EMBOSS 6.5.0


Function ajBtreeIdentFetchHitref

Get an ID reference hit structure from a leaf node given an identifier

Prototype

void ajBtreeIdentFetchHitref (
      AjPBtcache cache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputkey
AjPListhitlistOutputList of reference hit objects
void RETURN

From EMBOSS 6.5.0


Function ajBtreeWriteParamsC

Write B+ tree parameters to file

Prototype

void ajBtreeWriteParamsC (
      const AjPBtcache cache,
      const char* fntxt,
      const char* exttxt,
      const char* idirtxt
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
const char*fntxtInputfile name
const char*exttxtInputindex file extension name
const char*idirtxtInputindex file directory
void RETURN

From EMBOSS 6.4.0


Function ajBtreeWriteParamsS

Write B+ tree parameters to file

Prototype

void ajBtreeWriteParamsS (
      const AjPBtcache cache,
      const AjPStr fn,
      const AjPStr ext,
      const AjPStr idir
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
const AjPStrfnInputfile name
const AjPStrextInputindex file extension name
const AjPStridirInputindex file directory
void RETURN

From EMBOSS 6.4.0


Function ajBtreeReadParamsC

Read B+ tree parameters from file

Prototype

AjBool ajBtreeReadParamsC (
      const char* filetxt,
      const char* exttxt,
      const char* idirtxt,
      AjBool* secondary,
      AjBool* compressed,
      ajuint* kwlimit,
      ajuint* idlimit,
      ajuint* refcount,
      ajuint* pripagesize,
      ajuint* secpagesize,
      ajuint* pricachesize,
      ajuint* seccachesize,
      ajulong* pripagecount,
      ajulong* secpagecount,
      ajuint* order,
      ajuint* nperbucket,
      ajuint* level,
      ajuint* sorder,
      ajuint* snperbucket,
      ajulong* count,
      ajulong* countall
);

TypeNameRead/WriteDescription
const char*filetxtInputfile
const char*exttxtInputfile extension
const char*idirtxtInputindex directory
AjBool*secondaryOutputtrue for a secondary index
AjBool*compressedOutputtrue for a compressed index
ajuint*kwlimitOutputmaximum length of a keyword
ajuint*idlimitOutputmaximum length of a secondary id
ajuint*refcountOutputreference file(s) per entry
ajuint*pripagesizeOutputsize of primary pages
ajuint*secpagesizeOutputsize of secondary pages
ajuint*pricachesizeOutputPrimary cachesize
ajuint*seccachesizeOutputSecondary cachesize
ajulong*pripagecountOutputPrimary page count
ajulong*secpagecountOutputSecondary page count
ajuint*orderOutputtree order
ajuint*nperbucketOutputbucket fill
ajuint*levelOutputdepth of tree (0 = root leaf)
ajuint*sorderOutputsecondary tree order
ajuint*snperbucketOutputsecondary bucket fill
ajulong*countOutputnumber of primary keywords in the index
ajulong*countallOutputnumber of total keywords in the index
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeReadParamsS

Read B+ tree parameters from file

Prototype

AjBool ajBtreeReadParamsS (
      const AjPStr file,
      const AjPStr ext,
      const AjPStr idir,
      AjBool* secondary,
      AjBool* compressed,
      ajuint* kwlimit,
      ajuint* idlimit,
      ajuint* refcount,
      ajuint* pripagesize,
      ajuint* secpagesize,
      ajuint* pricachesize,
      ajuint* seccachesize,
      ajulong* pripagecount,
      ajulong* secpagecount,
      ajuint* order,
      ajuint* nperbucket,
      ajuint* level,
      ajuint* sorder,
      ajuint* snperbucket,
      ajulong* count,
      ajulong* countall
);

TypeNameRead/WriteDescription
const AjPStrfileInputfile
const AjPStrextInputfile extension
const AjPStridirInputindex directory
AjBool*secondaryOutputtrue for a secondary index
AjBool*compressedOutputtrue for a compressed index
ajuint*kwlimitOutputmaximum length of a keyword
ajuint*idlimitOutputmaximum length of a secondary id
ajuint*refcountOutputreference file(s) per entry
ajuint*pripagesizeOutputsize of primary pages
ajuint*secpagesizeOutputsize of secondary pages
ajuint*pricachesizeOutputPrimary cachesize
ajuint*seccachesizeOutputSecondary cachesize
ajulong*pripagecountOutputPrimary page count
ajulong*secpagecountOutputSecondary page count
ajuint*orderOutputtree order
ajuint*nperbucketOutputbucket fill
ajuint*levelOutputdepth of tree (0 = root leaf)
ajuint*sorderOutputsecondary tree order
ajuint*snperbucketOutputsecondary bucket fill
ajulong*countOutputnumber of primary keywords in the index
ajulong*countallOutputnumber of total keywords in the index
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeIdwildNew

Construct a wildcard id search object

Prototype

AjPBtIdwild ajBtreeIdwildNew (
      AjPBtcache cache,
      const AjPStr wild
);

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

From EMBOSS 3.0.0


Function ajBtreeIdwildDel

Destroy a wildcard search object

Prototype

void ajBtreeIdwildDel (
      AjPBtIdwild* Pthis
);

TypeNameRead/WriteDescription
AjPBtIdwild*PthisModifyb+ tree identifier wildcard structure
void RETURN

From EMBOSS 3.0.0


Function ajBtreeKeywildNew

Construct a wildcard keyword search object

Prototype

AjPBtKeywild ajBtreeKeywildNew (
      AjPBtcache cache,
      const AjPStr wild
);

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

From EMBOSS 3.0.0


Function ajBtreeKeywildDel

Destroy a wildcard keyword search object

Prototype

void ajBtreeKeywildDel (
      AjPBtKeywild* Pthis
);

TypeNameRead/WriteDescription
AjPBtKeywild*PthisModifyb+ tree wildcard keyword structure
void RETURN

From EMBOSS 3.0.0


Function ajBtreeIdwildQuery

Wildcard retrieval of entries by identifier

Prototype

AjPBtId ajBtreeIdwildQuery (
      AjPBtcache cache,
      AjPBtIdwild wild
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtIdwildwildModifyWildcard
AjPBtId RETURNnext matching Id or NULL

From EMBOSS 6.5.0


Function ajBtreeIdentFetchwildId

Wildcard retrieval of entries

Prototype

void ajBtreeIdentFetchwildId (
      AjPBtcache cache,
      const AjPStr key,
      AjPList idlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputWildcard key
AjPListidlistModifylist of matching AjPBtIds
void RETURN

From EMBOSS 6.5.0


Function ajBtreeIdentFetchwildHit

Wildcard retrieval of entries

Prototype

void ajBtreeIdentFetchwildHit (
      AjPBtcache cache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputWildcard key
AjPListhitlistModifylist of matching AjPBtHits
void RETURN

From EMBOSS 6.5.0


Function ajBtreeIdentFetchwildHitref

Wildcard retrieval of entries

Prototype

void ajBtreeIdentFetchwildHitref (
      AjPBtcache cache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputWildcard key
AjPListhitlistModifylist of matching AjPBtHitrefs
void RETURN

From EMBOSS 6.5.0


Function ajBtreeReplaceId

Replace an ID structure in a leaf node given a key

Prototype

AjBool ajBtreeReplaceId (
      AjPBtcache cache,
      const AjPBtId rid
);

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

From EMBOSS 3.0.0


Function ajBtreeReadEntriesC

Read B+ tree entries from file

Prototype

ajuint ajBtreeReadEntriesC (
      const char* filename,
      const char* indexdir,
      const char* directory,
      AjPStr** seqfiles,
      AjPStr*** reffiles,
      ajuint* refcount
);

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)
ajuint*refcountOutputNumber of reference file(s) per entry
ajuint RETURNnumber of entries

From EMBOSS 6.5.0


Function ajBtreeReadEntriesS

Read B+ tree entries from file

Prototype

ajuint ajBtreeReadEntriesS (
      const AjPStr filename,
      const AjPStr indexdir,
      const AjPStr directory,
      AjPStr** seqfiles,
      AjPStr*** reffiles,
      ajuint* refcount
);

TypeNameRead/WriteDescription
const AjPStrfilenameInputfile name
const AjPStrindexdirInputindex file directory
const AjPStrdirectoryInputfile directory
AjPStr**seqfilesOutputsequence file names
AjPStr***reffilesOutputreference file names (if any)
ajuint*refcountOutputNumber of reference file(s) per entry
ajuint RETURNnumber of entries

From EMBOSS 6.4.0


Function ajBtreePriNew

Constructor for index bucket keyword information

Prototype

AjPBtPri ajBtreePriNew (
      void
);

TypeNameRead/WriteDescription
AjPBtPri RETURNIndex ID object

From EMBOSS 3.0.0


Function ajBtreePriDel

Destructor for keyword index primary bucket information

Prototype

void ajBtreePriDel (
      AjPBtPri* thys
);

TypeNameRead/WriteDescription
AjPBtPri*thysOutputindex keyword primary object
void RETURN

From EMBOSS 3.0.0


Function ajBtreeKeyIndex

Insert a keyword structure into the tree.

Prototype

AjBool ajBtreeKeyIndex (
      AjPBtcache cache,
      const AjPStr keyword,
      const AjPStr id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeywordInputkeyword
const AjPStridInputentry identifier
AjBool RETURNTrue if keyword and ID combination was inserted False if keyword exists already for ID

From EMBOSS 6.5.0


Function ajBtreeKeyFindLen

Get keyword structure matching a keyword truncated to maximum indexed length

Prototype

AjBool ajBtreeKeyFindLen (
      AjPBtcache cache,
      const AjPStr key,
      ajulong* treeblock
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPStrkeyInputkey
ajulong*treeblockOutputTree block number for id
AjBool RETURNajTrue if found

From EMBOSS 6.4.0


Function ajBtreeSeccacheNewC

Open a b+tree index file and initialise a cache object for keyword index

Prototype

AjPBtcache ajBtreeSeccacheNewC (
      const char* filetxt,
      const char* exttxt,
      const char* idirtxt,
      const char* mode,
      AjBool compressed,
      ajuint kwlimit,
      ajuint idlimit,
      ajuint pripagesize,
      ajuint secpagesize,
      ajuint pricachesize,
      ajuint seccachesize,
      ajulong pripagecount,
      ajulong secpagecount,
      ajuint order,
      ajuint fill,
      ajuint level,
      ajuint sorder,
      ajuint sfill,
      ajulong count,
      ajulong countall
);

TypeNameRead/WriteDescription
const char*filetxtInputname of file
const char*exttxtInputextension of file
const char*idirtxtInputindex file directory
const char*modeInputopening mode
AjBoolcompressedInputCompressed index flag
ajuintkwlimitInputMax key size
ajuintidlimitInputMax secondary id size
ajuintpripagesizeInputpagesize
ajuintsecpagesizeInputsecondary pagesize
ajuintpricachesizeInputsize of cache
ajuintseccachesizeInputsize of secondary cache
ajulongpripagecountInputpage count
ajulongsecpagecountInputpage count
ajuintorderInputTree order
ajuintfillInputNumber of entries per bucket
ajuintlevelInputlevel of tree
ajuintsorderInputorder of secondary tree
ajuintsfillInputNumber of entries per secondary bucket
ajulongcountInputNumber of entries in the index
ajulongcountallInputNumber of total entries in the index
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 3.0.0


Function ajBtreeSeccacheNewS

Open a b+tree index file and initialise a cache object for keyword index

Prototype

AjPBtcache ajBtreeSeccacheNewS (
      const AjPStr file,
      const AjPStr ext,
      const AjPStr idir,
      const char* mode,
      AjBool compressed,
      ajuint kwlimit,
      ajuint idlimit,
      ajuint pripagesize,
      ajuint secpagesize,
      ajuint pricachesize,
      ajuint seccachesize,
      ajulong pripagecount,
      ajulong secpagecount,
      ajuint order,
      ajuint fill,
      ajuint level,
      ajuint sorder,
      ajuint sfill,
      ajulong count,
      ajulong countall
);

TypeNameRead/WriteDescription
const AjPStrfileInputname of file
const AjPStrextInputextension of file
const AjPStridirInputindex file directory
const char*modeInputopening mode
AjBoolcompressedInputCompressed index flag
ajuintkwlimitInputMax key size
ajuintidlimitInputMax secondary id size
ajuintpripagesizeInputPrimary pagesize
ajuintsecpagesizeInputSecondary pagesize
ajuintpricachesizeInputsize of primary cache
ajuintseccachesizeInputsize of secondary cache
ajulongpripagecountInputPrimary page count
ajulongsecpagecountInputSecondary page count
ajuintorderInputTree order
ajuintfillInputNumber of entries per bucket
ajuintlevelInputlevel of tree
ajuintsorderInputorder of secondary tree
ajuintsfillInputNumber of entries per secondary bucket
ajulongcountInputNumber of entries in the index
ajulongcountallInputNumber of total entries in the index
AjPBtcache RETURNinitialised disc block cache structure

From EMBOSS 6.4.0


Function btreeKeyidFind

Find the node that should contain a new key for insertion

Prototype

AjPBtpage btreeKeyidFind (
      AjPBtcache cache,
      const AjPStr key
);

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

From EMBOSS 3.0.0


Function ajBtreeKeywildQuery

Wildcard retrieval of keyword index entries

Prototype

AjPBtId ajBtreeKeywildQuery (
      AjPBtcache cache,
      AjPBtKeywild wild,
      AjPBtcache idcache
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtKeywildwildModifyWildcard
AjPBtcacheidcacheModifyid cache
AjPBtId RETURNnext matching Id or NULL

From EMBOSS 3.0.0


Function ajBtreeKeyFetchId

Retrieval of keyword index entries with a perfect match to the keyword

Prototype

void ajBtreeKeyFetchId (
      AjPBtcache cache,
      AjPBtcache idcache,
      const AjPStr key,
      AjPList btidlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtcacheidcacheModifyid cache
const AjPStrkeyInputkey
AjPListbtidlistModifyList of matching AjPBtId entries
void RETURN

From EMBOSS 6.5.0


Function ajBtreeKeyFetchHit

Retrieval of keyword hits with a perfect match to the keyword

Prototype

void ajBtreeKeyFetchHit (
      AjPBtcache cache,
      AjPBtcache idcache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtcacheidcacheModifyid cache
const AjPStrkeyInputkey
AjPListhitlistModifyList of matching AjPBtHit entries
void RETURN

From EMBOSS 6.5.0


Function ajBtreeKeyFetchHitref

Retrieval of keyword hits with a perfect match to the keyword

Prototype

void ajBtreeKeyFetchHitref (
      AjPBtcache cache,
      AjPBtcache idcache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtcacheidcacheModifyid cache
const AjPStrkeyInputkey
AjPListhitlistModifyList of matching AjPBtHitref entries
void RETURN

From EMBOSS 6.5.0


Function ajBtreeKeyFetchwildId

Wildcard retrieval of keyword index entries

Prototype

void ajBtreeKeyFetchwildId (
      AjPBtcache cache,
      AjPBtcache idcache,
      const AjPStr key,
      AjPList btidlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtcacheidcacheModifyid cache
const AjPStrkeyInputkey
AjPListbtidlistModifyList of matching AjPBtId entries
void RETURN

From EMBOSS 6.5.0


Function ajBtreeKeyFetchwildHit

Wildcard retrieval of keyword hit entries

Prototype

void ajBtreeKeyFetchwildHit (
      AjPBtcache cache,
      AjPBtcache idcache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtcacheidcacheModifyid cache
const AjPStrkeyInputkey
AjPListhitlistModifyList of matching AjPBtHit entries
void RETURN

From EMBOSS 6.5.0


Function ajBtreeKeyFetchwildHitref

Wildcard retrieval of keyword reference hit entries

Prototype

void ajBtreeKeyFetchwildHitref (
      AjPBtcache cache,
      AjPBtcache idcache,
      const AjPStr key,
      AjPList hitlist
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtcacheidcacheModifyid cache
const AjPStrkeyInputkey
AjPListhitlistModifyList of matching AjPBtHitref entries
void RETURN

From EMBOSS 6.5.0


Function ajBtreeIdentIndex

Insert an ID structure into the tree

Prototype

void ajBtreeIdentIndex (
      AjPBtcache cache,
      AjPBtId id
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
AjPBtIdidModifyId object
void RETURNpointer to a page

From EMBOSS 6.5.0


Function ajBtreeDumpIdentifiers

Read the leaves of an identifier tree

Prototype

void ajBtreeDumpIdentifiers (
      AjPBtcache cache,
      ajuint dmin,
      ajuint dmax,
      AjPFile outf
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
ajuintdminInputminimum number of times the key should appear
ajuintdmaxInputmaximum number of times the key should appear
AjPFileoutfModifyoutput file
void RETURN

From EMBOSS 5.0.0


Function ajBtreeDeleteIdent

Entry point for hybrid ID deletion.

Prototype

AjBool ajBtreeDeleteIdent (
      AjPBtcache cache,
      const AjPBtId btid
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtIdbtidInputhybrid object
AjBool RETURNTrue if found and deleted

From EMBOSS 6.5.0


Function ajBtreeDeletePriId

Entry point for keyword tree ID deletion.

Prototype

AjBool ajBtreeDeletePriId (
      AjPBtcache cache,
      const AjPBtPri pri
);

TypeNameRead/WriteDescription
AjPBtcachecacheModifycache
const AjPBtPripriInputkeyword object
AjBool RETURNTrue if found and deleted

From EMBOSS 6.1.0


Function ajBtreePageIsPrimary

Returns a true is a page is primary

Prototype

AjBool ajBtreePageIsPrimary (
      const AjPBtpage page
);

TypeNameRead/WriteDescription
const AjPBtpagepageInputPage
AjBool RETURNTrue if page is primary index or bucket

From EMBOSS 6.5.0


Function ajBtreeCacheGetPagecount

Returns the total number of pages in a tree index

Prototype

ajulong ajBtreeCacheGetPagecount (
      const AjPBtcache cache
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
ajulong RETURNnumber of pages in a tree index

From EMBOSS 6.4.0


Function ajBtreeCacheGetPripagesize

Returns the primary page size of a tree index

Prototype

ajuint ajBtreeCacheGetPripagesize (
      const AjPBtcache cache
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
ajuint RETURNPage size of a tree index

From EMBOSS 6.5.0


Function ajBtreeCacheGetSecpagesize

Returns the secondary page size of a tree index

Prototype

ajuint ajBtreeCacheGetSecpagesize (
      const AjPBtcache cache
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
ajuint RETURNPage size of a tree index

From EMBOSS 6.5.0


Function ajBtreeCacheGetTotsize

Returns the number of bytes in an uncompressed tree index

Prototype

ajulong ajBtreeCacheGetTotsize (
      const AjPBtcache cache
);

TypeNameRead/WriteDescription
const AjPBtcachecacheInputcache
ajulong RETURNnumber of bytes in a tree index

From EMBOSS 6.4.0


Function ajBtreePageGetTypename

Returns the node type name of a tree index page

Prototype

const char* ajBtreePageGetTypename (
      const AjPBtpage page
);

TypeNameRead/WriteDescription
const AjPBtpagepageInputPage
const char* RETURNName of page type

From EMBOSS 6.4.0


Function ajBtreeStatNode

Returns number of keys, overflow pages visited and free space unused for a b+ tree node page

Prototype

AjBool ajBtreeStatNode (
      AjPBtcache cache,
      const AjPBtpage page,
      AjBool full,
      ajuint* nkeys,
      ajuint* overflows,
      ajuint* freespace,
      ajulong* refs,
      const AjPTable newpostable
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
const AjPBtpagepageInputPage
AjBoolfullInputIf true, write detailed debug report
ajuint*nkeysOutputNumber of keys
ajuint*overflowsOutputNumber of overflow pages
ajuint*freespaceOutputUnused space in this page
ajulong*refsModifyReferences to pages
const AjPTablenewpostableInputPage numbers for page offsets
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeStatNumnode

Returns number of keys, overflow pages visited and free space unused for a b+ tree numeric node page

Prototype

AjBool ajBtreeStatNumnode (
      AjPBtcache cache,
      const AjPBtpage page,
      AjBool full,
      ajuint* nkeys,
      ajuint* overflows,
      ajuint* freespace,
      ajulong* refs,
      const AjPTable newpostable
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
const AjPBtpagepageInputPage
AjBoolfullInputIf true, write detailed debug report
ajuint*nkeysOutputNumber of keys
ajuint*overflowsOutputNumber of overflow pages
ajuint*freespaceOutputUnused space in this page
ajulong*refsModifyReferences to pages
const AjPTablenewpostableInputPage numbers for page offsets
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeStatIdbucket

Returns number of keys, overflow pages visited and free space unused for a b+ tree bucket page

Prototype

AjBool ajBtreeStatIdbucket (
      AjPBtcache cache,
      const AjPBtpage page,
      AjBool full,
      ajuint* nentries,
      ajuint* ndups,
      ajuint* nextra,
      ajuint* overflows,
      ajuint* freespace,
      ajulong* refs,
      const AjPTable newpostable
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
const AjPBtpagepageInputPage
AjBoolfullInputIf true, write detailed debug report
ajuint*nentriesOutputNumber of entries
ajuint*ndupsOutputNumber of entries with duplicates
ajuint*nextraOutputNumber of extra entries as duplicates
ajuint*overflowsOutputNumber of overflow pages
ajuint*freespaceOutputUnused space in this page
ajulong*refsModifyReferences to pages
const AjPTablenewpostableInputPage numbers for page offsets
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeStatNumbucket

Returns number of keys, overflow pages visited and free space unused for a b+ tree secondary bucket page

Prototype

AjBool ajBtreeStatNumbucket (
      AjPBtcache cache,
      const AjPBtpage page,
      AjBool full,
      ajuint* nentries,
      ajuint* overflows,
      ajuint* freespace
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
const AjPBtpagepageInputPage
AjBoolfullInputIf true, write detailed debug report
ajuint*nentriesOutputNumber of entries
ajuint*overflowsOutputNumber of overflow pages
ajuint*freespaceOutputUnused space in this page
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeStatPribucket

Returns number of keys, overflow pages visited and free space unused for a b+ tree primary bucket page

Prototype

AjBool ajBtreeStatPribucket (
      AjPBtcache cache,
      const AjPBtpage page,
      AjBool full,
      ajuint* nentries,
      ajuint* overflows,
      ajuint* freespace,
      ajulong* refs,
      const AjPTable newpostable
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
const AjPBtpagepageInputPage
AjBoolfullInputIf true, write detailed debug report
ajuint*nentriesOutputNumber of entries
ajuint*overflowsOutputNumber of overflow pages
ajuint*freespaceOutputUnused space in this page
ajulong*refsModifyReferences to pages
const AjPTablenewpostableInputPage numbers for page offsets
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreeStatSecbucket

Returns number of keys, overflow pages visited and free space unused for a b+ tree secondary bucket page

Prototype

AjBool ajBtreeStatSecbucket (
      AjPBtcache cache,
      const AjPBtpage page,
      AjBool full,
      ajuint* nentries,
      ajuint* overflows,
      ajuint* freespace
);

TypeNameRead/WriteDescription
AjPBtcachecacheOutputcache
const AjPBtpagepageInputPage
AjBoolfullInputIf true, write detailed debug report
ajuint*nentriesOutputNumber of entries
ajuint*overflowsOutputNumber of overflow pages
ajuint*freespaceOutputUnused space in this page
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajBtreePageGetSize

Return the used size of a cache page

Prototype

ajuint ajBtreePageGetSize (
      const AjPBtpage page,
      ajuint refcount
);

TypeNameRead/WriteDescription
const AjPBtpagepageInputPage 8
ajuintrefcountInputNumber of reference offsets
ajuint RETURNUsed page size

From EMBOSS 6.4.0


Function ajBtreeStatsOut

Reports overall statistics from B+tree indexing since the last call

Prototype

void ajBtreeStatsOut (
      AjPFile outf,
      ajulong* Psplitrootid,
      ajulong* Psplitrootnum,
      ajulong* Psplitrootkey,
      ajulong* Psplitrootsec,
      ajulong* Psplitleafid,
      ajulong* Psplitleafnum,
      ajulong* Psplitleafkey,
      ajulong* Psplitleafsec,
      ajulong* Preorderid,
      ajulong* Preordernum,
      ajulong* Preorderkey,
      ajulong* Preordersec
);

TypeNameRead/WriteDescription
AjPFileoutfModifyoutput file file
ajulong*PsplitrootidModifyNumber of hyb splitroot calls to date
ajulong*PsplitrootnumModifyNumber of num splitroot calls to date
ajulong*PsplitrootkeyModifyNumber of pri splitroot calls to date
ajulong*PsplitrootsecModifyNumber of sec splitroot calls to date
ajulong*PsplitleafidModifyNumber of id splitleaf calls to date
ajulong*PsplitleafnumModifyNumber of num splitleaf calls to date
ajulong*PsplitleafkeyModifyNumber of pri splitleaf calls to date
ajulong*PsplitleafsecModifyNumber of sec splitleaf calls to date
ajulong*PreorderidModifyNumber of id reorderings to date
ajulong*PreordernumModifyNumber of num reorderings to date
ajulong*PreorderkeyModifyNumber of pri reorderings to date
ajulong*PreordersecModifyNumber of sec reorderings to date
void RETURN

From EMBOSS 6.5.0


Function ajBtreeExit

Cleans up B+tree indexing internal memory

Prototype

void ajBtreeExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.4.0


Function ajBtreeIdCmp

Comparison function for sorting B+tree ID objects by database file number and offset.

Prototype

ajint ajBtreeIdCmp (
      const void* x,
      const void* y
);

TypeNameRead/WriteDescription
const void*xInputStandard argument. Item value.
const void*yInputStandard argument. Comparison item value.
ajint RETURNComparison result. Zero if equal, non-zero if different.

From EMBOSS 6.4.0


Function ajBtreeIdHash

Hash function for a table with a B+tree primary key

Prototype

ajulong ajBtreeIdHash (
      const void* key,
      ajulong hashsize
);

TypeNameRead/WriteDescription
const void*keyInputStandard argument. Table key.
ajulonghashsizeInputStandard argument. Estimated Hash size.
ajulong RETURNHash value in range 0 to hashsize-1

From EMBOSS 6.4.0


Function ajBtreeHitCmp

Comparison function for sorting B+tree hit objects by database file number and offset.

Prototype

ajint ajBtreeHitCmp (
      const void* x,
      const void* y
);

TypeNameRead/WriteDescription
const void*xInputStandard argument. Item value.
const void*yInputStandard argument. Comparison item value.
ajint RETURNComparison result. Zero if equal, non-zero if different.

From EMBOSS 6.5.0


Function ajBtreeHitHash

Hash function for a table with a B+tree hit primary key

Prototype

ajulong ajBtreeHitHash (
      const void* key,
      ajulong hashsize
);

TypeNameRead/WriteDescription
const void*keyInputStandard argument. Table key.
ajulonghashsizeInputStandard argument. Estimated Hash size.
ajulong RETURNHash value in range 0 to hashsize-1

From EMBOSS 6.5.0


Function ajBtreeHitrefCmp

Comparison function for sorting B+tree reference hit objects by database file number and offset.

Prototype

ajint ajBtreeHitrefCmp (
      const void* x,
      const void* y
);

TypeNameRead/WriteDescription
const void*xInputStandard argument. Item value.
const void*yInputStandard argument. Comparison item value.
ajint RETURNComparison result. Zero if equal, non-zero if different.

From EMBOSS 6.5.0


Function ajBtreeHitrefHash

Hash function for a table with a B+tree reference hit primary key

Prototype

ajulong ajBtreeHitrefHash (
      const void* key,
      ajulong hashsize
);

TypeNameRead/WriteDescription
const void*keyInputStandard argument. Table key.
ajulonghashsizeInputStandard argument. Estimated Hash size.
ajulong RETURNHash value in range 0 to hashsize-1

From EMBOSS 6.5.0