ajtable.c

Datatypes:
AjPTable Hash tables


Datatype: AjPTable

Function is for manipulating hash tables with any value type. Some functions are specially designed to understand string (AjPStr) values.

Sections:
ConstructorsConstructors
DestructorsDestructors
RetrievalCasts
Trace functionsMiscellaneous
Adding valuesModifiers
Map function to each valueModifiers
ModifyModifiers
MergingModifiers
exitMiscellaneous


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTableNewcreates, initialises, and returns a new, empty table that expects a specified number of key-value pairs.
ajTableNewFunctionLencreates, initialises, and returns a new, empty table that expects a specified number of key-value pairs.


Function ajTableNew

creates, initialises, and returns a new, empty table that expects a specified number of key-value pairs.

Prototype

AjPTable ajTableNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputnumber of key-value pairs
AjPTable RETURNnew table.

From EMBOSS 1.0.0


Function ajTableNewFunctionLen

creates, initialises, and returns a new, empty table that expects a specified number of key-value pairs.

Prototype

AjPTable ajTableNewFunctionLen (
      ajuint size,
      ajint function cmp,
      ajuint function hash,
      void function keydel,
      void function valdel
);

TypeNameRead/WriteDescription
ajuintsizeInputnumber of key-value pairs
ajint functioncmpFunctionfunction for comparing
ajuint functionhashFunctionfunction for hashing keys
void functionkeydelFunctionkey destructor function
void functionvaldelFunctionvalue destructor function
AjPTable RETURNnew table.

From EMBOSS 5.0.0


AjPTable: Destructors

Functions:
ajTableDelDeallocates and clears a hash table, and any keys or values.
ajTableDelKeydelValdelDeallocates and clears a hash table, and any keys or values.
ajTableDelValdelDeallocates and clears a hash table, and any keys or values.
ajTableFreeDeallocates and clears a hash table. Does not clear keys or values.


Function ajTableDel

Deallocates and clears a hash table, and any keys or values.

Prototype

void ajTableDel (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable (by reference)
void RETURN

From EMBOSS 6.4.0


Function ajTableDelKeydelValdel

Deallocates and clears a hash table, and any keys or values.

Prototype

void ajTableDelKeydelValdel (
      AjPTable* Ptable,
      void function keydel,
      void function valdel
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable (by reference)
void functionkeydelFunctionkey destructor
void functionvaldelFunctionvalue destructor
void RETURN

From EMBOSS 6.4.0


Function ajTableDelValdel

Deallocates and clears a hash table, and any keys or values.

Prototype

void ajTableDelValdel (
      AjPTable* Ptable,
      void function valdel
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable (by reference)
void functionvaldelFunctionvalue destructor
void RETURN

From EMBOSS 6.4.0


Function ajTableFree

Deallocates and clears a hash table. Does not clear keys or values.

Prototype

void ajTableFree (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable (by reference)
void RETURN

From EMBOSS 1.0.0


AjPTable: Retrieval

Functions:
ajTableFetchCreturns the value associated with key in table, or null if table does not hold key.
ajTableFetchSreturns the value associated with key in table, or null if table does not hold key.
ajTableFetchVReturns the value associated with key in table, or null if table does not hold key.
ajTableFetchmodCreturns the value associated with key in table, or null if table does not hold key.
ajTableFetchmodSreturns the value associated with key in table, or null if table does not hold key.
ajTableFetchmodVReturns the value associated with key in table, or null if table does not hold key.
ajTableFetchmodTraceVReturns the value associated with key in table, or null if table does not hold key.
ajTableGetLengthreturns the number of key-value pairs in table.
ajTableGetSizereturns the size of the hash array in a table.
ajTableMatchCReturns true if the key is found in the table
ajTableMatchSReturns true if the key is found in the table
ajTableMatchVReturns true if the key is found in the table
ajTableToarrayKeyscreates two N+1 element arrays that holds the N keys in table in an unspecified order and returns the number of elements. The final element of the array is NULL.
ajTableToarrayKeysValuescreates two N+1 element arrays that holds the N key-value pairs in table in an unspecified order and returns the number of elements. The final element of the array is NULL.
ajTableToarrayValuescreates two N+1 element arrays that holds the N values in table in an unspecified order and returns the number of elements. The final element of the array is NULL.


Function ajTableFetchC

returns the value associated with key in table, or null if table does not hold key.

Prototype

const void* ajTableFetchC (
      const AjPTable table,
      const char* txtkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const char*txtkeyInputkey to find.
const void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableFetchS

returns the value associated with key in table, or null if table does not hold key.

Prototype

const void* ajTableFetchS (
      const AjPTable table,
      const AjPStr key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const AjPStrkeyInputkey to find.
const void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableFetchV

Returns the value associated with key in table, or null if table does not hold key.

Prototype

const void* ajTableFetchV (
      const AjPTable table,
      const void* key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const void*keyInputkey to find.
const void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableFetchmodC

returns the value associated with key in table, or null if table does not hold key.

Prototype

void* ajTableFetchmodC (
      const AjPTable table,
      const char* txtkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const char*txtkeyInputkey to find.
void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableFetchmodS

returns the value associated with key in table, or null if table does not hold key.

Prototype

void* ajTableFetchmodS (
      const AjPTable table,
      const AjPStr key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const AjPStrkeyInputkey to find.
void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableFetchmodV

Returns the value associated with key in table, or null if table does not hold key.

Prototype

void* ajTableFetchmodV (
      const AjPTable table,
      const void* key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const void*keyInputkey to find.
void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableFetchmodTraceV

Returns the value associated with key in table, or null if table does not hold key.

Prototype

void* ajTableFetchmodTraceV (
      const AjPTable table,
      const void* key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const void*keyInputkey to find.
void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTableGetLength

returns the number of key-value pairs in table.

Prototype

ajuint ajTableGetLength (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable to be applied.
ajuint RETURNnumber of key-value pairs.

From EMBOSS 5.0.0


Function ajTableGetSize

returns the size of the hash array in a table.

Prototype

ajuint ajTableGetSize (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable to be applied.
ajuint RETURNnumber of hash array positions

From EMBOSS 6.4.0


Function ajTableMatchC

Returns true if the key is found in the table

Prototype

AjBool ajTableMatchC (
      const AjPTable table,
      const char* txtkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const char*txtkeyInputkey to find.
AjBool RETURNTrue if key was found[

From EMBOSS 6.4.0


Function ajTableMatchS

Returns true if the key is found in the table

Prototype

AjBool ajTableMatchS (
      const AjPTable table,
      const AjPStr key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const AjPStrkeyInputkey to find.
AjBool RETURNTrue if key was found

From EMBOSS 6.4.0


Function ajTableMatchV

Returns true if the key is found in the table

Prototype

AjBool ajTableMatchV (
      const AjPTable table,
      const void* key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const void*keyInputkey to find.
AjBool RETURNTrue if key was found

From EMBOSS 6.4.0


Function ajTableToarrayKeys

creates two N+1 element arrays that holds the N keys in table in an unspecified order and returns the number of elements. The final element of the array is NULL.

Prototype

ajuint ajTableToarrayKeys (
      const AjPTable table,
      void*** keyarray
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable
void***keyarrayOutputNULL terminated array of keys.
ajuint RETURNsize of array returned

From EMBOSS 6.2.0


Function ajTableToarrayKeysValues

creates two N+1 element arrays that holds the N key-value pairs in table in an unspecified order and returns the number of elements. The final element of the array is NULL.

Prototype

ajuint ajTableToarrayKeysValues (
      const AjPTable table,
      void*** keyarray,
      void*** valarray
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable
void***keyarrayOutputNULL terminated array of keys.
void***valarrayOutputNULL terminated array of values.
ajuint RETURNsize of arrays returned

From EMBOSS 6.2.0


Function ajTableToarrayValues

creates two N+1 element arrays that holds the N values in table in an unspecified order and returns the number of elements. The final element of the array is NULL.

Prototype

ajuint ajTableToarrayValues (
      const AjPTable table,
      void*** valarray
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable
void***valarrayOutputNULL terminated array of values.
ajuint RETURNsize of array returned

From EMBOSS 6.2.0


AjPTable: Trace functions

Functions:
ajTableTraceWrites debug messages to trace the contents of a table.


Function ajTableTrace

Writes debug messages to trace the contents of a table.

Prototype

void ajTableTrace (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable
void RETURN

From EMBOSS 1.0.0


AjPTable: Adding values

Functions:
ajTablePutchange the value associated with key in table to value and returns the previous value, or adds key and value if table does not hold key, and returns null.
ajTablePutCleanchange the value associated with key in table to value and returns the previous value, applying destructors to the given key and value, or adds key and value if table does not hold key, and returns null.
ajTablePutTracechange the value associated with key in table to value and returns the previous value, or adds key and value if table does not hold key, and returns null. Trace the internals as the value is inserted.
ajTableRemoveRemoves the key-value pair from table and returns the removed value. If table does not hold key, ajTableRemove has no effect and returns null.
ajTableRemoveKeyRemoves the key-value pair from table and returns the removed value. If table does not hold key, ajTableRemove has no effect and returns null.


Function ajTablePut

change the value associated with key in table to value and returns the previous value, or adds key and value if table does not hold key, and returns null.

Prototype

void* ajTablePut (
      AjPTable table,
      void* key,
      void* value
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable to add to
void*keyUnknownkey
void*valueModifyvalue of key
void* RETURNprevious value if key exists, NULL if not.

From EMBOSS 1.0.0


Function ajTablePutClean

change the value associated with key in table to value and returns the previous value, applying destructors to the given key and value, or adds key and value if table does not hold key, and returns null.

Prototype

AjBool ajTablePutClean (
      AjPTable table,
      void* key,
      void* value,
      void function keydel,
      void function valdel
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable to add to
void*keyUnknownkey
void*valueModifyvalue of key
void functionkeydelFunctionkey destructor
void functionvaldelFunctionvalue destructor
AjBool RETURNprevious value was found and deleted.

From EMBOSS 6.4.0


Function ajTablePutTrace

change the value associated with key in table to value and returns the previous value, or adds key and value if table does not hold key, and returns null. Trace the internals as the value is inserted.

Prototype

void* ajTablePutTrace (
      AjPTable table,
      void* key,
      void* value
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable to add to
void*keyUnknownkey
void*valueModifyvalue of key
void* RETURNprevious value if key exists, NULL if not.

From EMBOSS 6.4.0


Function ajTableRemove

Removes the key-value pair from table and returns the removed value. If table does not hold key, ajTableRemove has no effect and returns null.

Prototype

void* ajTableRemove (
      AjPTable table,
      const void* key
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
const void*keyInputkey to be removed
void* RETURNremoved value.

From EMBOSS 1.0.0


Function ajTableRemoveKey

Removes the key-value pair from table and returns the removed value. If table does not hold key, ajTableRemove has no effect and returns null.

Prototype

void* ajTableRemoveKey (
      AjPTable table,
      const void* key,
      void** truekey
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
const void*keyInputkey to be removed
void**truekeyOutputtrue internal key returned, now owned by caller
void* RETURNremoved value.

From EMBOSS 5.0.0


AjPTable: Map function to each value

Functions:
ajTableMapcalls function 'apply' for each key-value in table in an unspecified order. The table keys should not be modified by function 'apply' although values can be updated.
ajTableMapDelcalls function 'apply' for each key-value in table in an unspecified order.


Function ajTableMap

calls function 'apply' for each key-value in table in an unspecified order. The table keys should not be modified by function 'apply' although values can be updated.

Prototype

void ajTableMap (
      AjPTable table,
      void function apply,
      void* cl
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable.
void functionapplyFunctionfunction to be applied
void*clModifyStandard. Usually NULL. To be passed to apply
void RETURN

From EMBOSS 1.0.0


Function ajTableMapDel

calls function 'apply' for each key-value in table in an unspecified order.

Prototype

void ajTableMapDel (
      AjPTable table,
      void function apply,
      void* cl
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable.
void functionapplyFunctionfunction to be applied
void*clModifyStandard. Usually NULL. To be passed to apply
void RETURN

From EMBOSS 2.9.0


AjPTable: Modify

Functions:
ajTableClearClears a hash table. Does not clear keys or values.
ajTableClearDeleteClears a hash table. Deletes all keys or values.
ajTableResizeCountResizes a hash table to a new number of expected values.
ajTableResizeHashsizeResizes a hash table to a new size.
ajTableSetDestroySets the destructor functions for keys and values
ajTableSetDestroybothSets the destructor functions values to be the same as for keys
ajTableSetDestroykeySets the destructor functions for keys
ajTableSetDestroyvalueSets the destructor functions for values
ajTableSettypeCharResets a hash table to use C character string keys
ajTableSettypeCharCaseResets a hash table to use case-insensitive C character string keys
ajTableSettypeDefaultResets a hash table to use default keys
ajTableSettypeIntResets a hash table to use integer keys
ajTableSettypeLongResets a hash table to use long integer keys
ajTableSettypeStringResets a hash table to use string keys
ajTableSettypeStringCaseResets a hash table to use case-insensitive string keys
ajTableSettypeUintResets a hash table to use unsigned integer keys
ajTableSettypeUlongResets a hash table to use unsigned long integer keys
ajTableSettypeUserResets a hash table to use user-defined keys


Function ajTableClear

Clears a hash table. Does not clear keys or values.

Prototype

void ajTableClear (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
void RETURN

From EMBOSS 6.4.0


Function ajTableClearDelete

Clears a hash table. Deletes all keys or values.

Prototype

void ajTableClearDelete (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
void RETURN

From EMBOSS 6.4.0


Function ajTableResizeCount

Resizes a hash table to a new number of expected values.

Prototype

void ajTableResizeCount (
      AjPTable table,
      ajuint size
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
ajuintsizeInputExpected number of key-value pairs
void RETURN

From EMBOSS 6.4.0


Function ajTableResizeHashsize

Resizes a hash table to a new size.

Prototype

void ajTableResizeHashsize (
      AjPTable table,
      ajuint hashsize
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
ajuinthashsizeInputExpected number of key-value pairs
void RETURN

From EMBOSS 6.4.0


Function ajTableSetDestroy

Sets the destructor functions for keys and values

Prototype

void ajTableSetDestroy (
      AjPTable table,
      void function keydel,
      void function valdel
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
void functionkeydelFunctionkey destructor function
void functionvaldelFunctionvalue destructor function
void RETURN

From EMBOSS 6.4.0


Function ajTableSetDestroyboth

Sets the destructor functions values to be the same as for keys

Prototype

void ajTableSetDestroyboth (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
void RETURN

From EMBOSS 6.4.0


Function ajTableSetDestroykey

Sets the destructor functions for keys

Prototype

void ajTableSetDestroykey (
      AjPTable table,
      void function keydel
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
void functionkeydelFunctionkey destructor function
void RETURN

From EMBOSS 6.4.0


Function ajTableSetDestroyvalue

Sets the destructor functions for values

Prototype

void ajTableSetDestroyvalue (
      AjPTable table,
      void function valdel
);

TypeNameRead/WriteDescription
AjPTabletableModifyTable
void functionvaldelFunctionvalue destructor function
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeChar

Resets a hash table to use C character string keys

Prototype

void ajTableSettypeChar (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeCharCase

Resets a hash table to use case-insensitive C character string keys

Prototype

void ajTableSettypeCharCase (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeDefault

Resets a hash table to use default keys

Prototype

void ajTableSettypeDefault (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeInt

Resets a hash table to use integer keys

Prototype

void ajTableSettypeInt (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeLong

Resets a hash table to use long integer keys

Prototype

void ajTableSettypeLong (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeString

Resets a hash table to use string keys

Prototype

void ajTableSettypeString (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeStringCase

Resets a hash table to use case-insensitive string keys

Prototype

void ajTableSettypeStringCase (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeUint

Resets a hash table to use unsigned integer keys

Prototype

void ajTableSettypeUint (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeUlong

Resets a hash table to use unsigned long integer keys

Prototype

void ajTableSettypeUlong (
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
void RETURN

From EMBOSS 6.4.0


Function ajTableSettypeUser

Resets a hash table to use user-defined keys

Prototype

void ajTableSettypeUser (
      AjPTable table,
      ajint function cmp,
      ajuint function hash
);

TypeNameRead/WriteDescription
AjPTabletableModifyHash table
ajint functioncmpFunctionfunction for comparing
ajuint functionhashFunctionfunction for hashing keys
void RETURN

From EMBOSS 6.4.0


AjPTable: Merging

Merging two tables with matchng key and value types

Functions:
ajTableMergeAndMerge two tables, keeping all keys that are in both tables
ajTableMergeEorMerge two tables, keeping all keys that are in only one table
ajTableMergeNotMerge two tables, removing all keys that are not in the new table
ajTableMergeOrMerge two tables, adding all unique keys from the new table


Function ajTableMergeAnd

Merge two tables, keeping all keys that are in both tables

Prototype

AjBool ajTableMergeAnd (
      AjPTable thys,
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTablethysModifyCurrent table
AjPTabletableModifyTable to be merged
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajTableMergeEor

Merge two tables, keeping all keys that are in only one table

Prototype

AjBool ajTableMergeEor (
      AjPTable thys,
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTablethysModifyCurrent table
AjPTabletableModifyTable to be merged
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajTableMergeNot

Merge two tables, removing all keys that are not in the new table

Prototype

AjBool ajTableMergeNot (
      AjPTable thys,
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTablethysModifyCurrent table
AjPTabletableModifyTable to be merged
AjBool RETURNTrue on success

From EMBOSS 6.4.0


Function ajTableMergeOr

Merge two tables, adding all unique keys from the new table

Prototype

AjBool ajTableMergeOr (
      AjPTable thys,
      AjPTable table
);

TypeNameRead/WriteDescription
AjPTablethysModifyCurrent table
AjPTabletableModifyTable to be merged
AjBool RETURNTrue on success

From EMBOSS 6.4.0


AjPTable: exit

Functions called on exit from the program by ajExit to do any necessary cleanup and to report internal statistics to the debug file

Functions:
ajTableExitPrints a summary of table usage with debug calls


Function ajTableExit

Prints a summary of table usage with debug calls

Prototype

void ajTableExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 2.8.0


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTablecharNewCreates a table with a character string key.
ajTablecharNewCaseCreates a table with a character string key and case insensitive searching.
ajTablecharNewCaseConstCreates a table with a character string key and case insensitive searching.
ajTablecharNewConstCreates a table with a character string key.


Function ajTablecharNew

Creates a table with a character string key.

Prototype

AjPTable ajTablecharNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputnumber of key-value pairs
AjPTable RETURNNew table object with a character string key.

From EMBOSS 5.0.0


Function ajTablecharNewCase

Creates a table with a character string key and case insensitive searching.

Prototype

AjPTable ajTablecharNewCase (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputHash size estimate.
AjPTable RETURNNew table object with a character string key.

From EMBOSS 5.0.0


Function ajTablecharNewCaseConst

Creates a table with a character string key and case insensitive searching.

Prototype

AjPTable ajTablecharNewCaseConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputHash size estimate.
AjPTable RETURNNew table object with a character string key.

From EMBOSS 6.4.0


Function ajTablecharNewConst

Creates a table with a character string key.

Prototype

AjPTable ajTablecharNewConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputnumber of key-value pairs
AjPTable RETURNNew table object with a character string key.

From EMBOSS 6.4.0


AjPTable: Trace functions

Functions:
ajTablecharPrintPrint function for a table with a character string key.


Function ajTablecharPrint

Print function for a table with a character string key.

Prototype

void ajTablecharPrint (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable.
void RETURN

From EMBOSS 5.0.0


AjPTable: Comparison functions

Functions:
ajTablecharCmpComparison function for a table with a character string key
ajTablecharCmpCaseComparison function for a table with a character string key and case insensitivity.
ajTablecharHashHash function for a table with a character string key
ajTablecharHashCaseHash function for a table with a character string key and case insensitivity.


Function ajTablecharCmp

Comparison function for a table with a character string key

Prototype

ajint ajTablecharCmp (
      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 5.0.0


Function ajTablecharCmpCase

Comparison function for a table with a character string key and case insensitivity.

Prototype

ajint ajTablecharCmpCase (
      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 5.0.0


Function ajTablecharHash

Hash function for a table with a character string key

Prototype

ajuint ajTablecharHash (
      const void* key,
      ajuint hashsize
);

TypeNameRead/WriteDescription
const void*keyInputStandard argument. Table key.
ajuinthashsizeInputStandard argument. Estimated Hash size.
ajuint RETURNHash value.

From EMBOSS 5.0.0


Function ajTablecharHashCase

Hash function for a table with a character string key and case insensitivity.

Prototype

ajuint ajTablecharHashCase (
      const void* key,
      ajuint hashsize
);

TypeNameRead/WriteDescription
const void*keyInputStandard argument. Table key.
ajuinthashsizeInputStandard argument. Estimated Hash size.
ajuint RETURNHash value.

From EMBOSS 5.0.0


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTableintNewCreates, initialises, and returns a new, empty table that can hold a specified number of integer key-value pairs.
ajTableintNewConstCreates, initialises, and returns a new, empty table that can hold a specified number of integer key-value pairs.


Function ajTableintNew

Creates, initialises, and returns a new, empty table that can hold a specified number of integer key-value pairs.

Prototype

AjPTable ajTableintNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


Function ajTableintNewConst

Creates, initialises, and returns a new, empty table that can hold a specified number of integer key-value pairs.

Prototype

AjPTable ajTableintNewConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


AjPTable: Destructors

Functions:
ajTableintFreeFree keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.
ajTableintFreeKeyFree keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.


Function ajTableintFree

Free keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTableintFree (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


Function ajTableintFreeKey

Free keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTableintFreeKey (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


AjPTable: Retrieval

Functions:
ajTableintFetchreturns the value associated with key in table, or null if table does not hold key.


Function ajTableintFetch

returns the value associated with key in table, or null if table does not hold key.

Prototype

const ajint* ajTableintFetch (
      const AjPTable table,
      const ajint* intkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const ajint*intkeyInputkey to find.
const ajint* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Modify

Functions:
ajTableintFetchmodreturns the value associated with key in table, or null if table does not hold key.


Function ajTableintFetchmod

returns the value associated with key in table, or null if table does not hold key.

Prototype

ajint* ajTableintFetchmod (
      AjPTable table,
      const ajint* intkey
);

TypeNameRead/WriteDescription
AjPTabletableModifytable to search
const ajint*intkeyInputkey to find.
ajint* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Comparison functions

Functions:
ajTableintCmpComparison function for a table with an integer key
ajTableintHashHash function for a table with an integer key


Function ajTableintCmp

Comparison function for a table with an integer key

Prototype

ajint ajTableintCmp (
      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 ajTableintHash

Hash function for a table with an integer key

Prototype

ajuint ajTableintHash (
      const void* key,
      ajuint hashsize
);

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

From EMBOSS 6.4.0


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTablelongNewCreates, initialises, and returns a new, empty table that can hold a specified number of long integer key-value pairs.
ajTablelongNewConstCreates, initialises, and returns a new, empty table that can hold a specified number of long integer key-value pairs.


Function ajTablelongNew

Creates, initialises, and returns a new, empty table that can hold a specified number of long integer key-value pairs.

Prototype

AjPTable ajTablelongNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


Function ajTablelongNewConst

Creates, initialises, and returns a new, empty table that can hold a specified number of long integer key-value pairs.

Prototype

AjPTable ajTablelongNewConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


AjPTable: Destructors

Functions:
ajTablelongFreeFree keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.
ajTablelongFreeKeyFree keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.


Function ajTablelongFree

Free keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTablelongFree (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


Function ajTablelongFreeKey

Free keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTablelongFreeKey (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


AjPTable: Retrieval

Functions:
ajTablelongFetchreturns the value associated with key in table, or null if table does not hold key.


Function ajTablelongFetch

returns the value associated with key in table, or null if table does not hold key.

Prototype

const ajlong* ajTablelongFetch (
      const AjPTable table,
      const ajlong* longkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const ajlong*longkeyInputkey to find.
const ajlong* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Modify

Functions:
ajTablelongFetchmodreturns the value associated with key in table, or null if table does not hold key.


Function ajTablelongFetchmod

returns the value associated with key in table, or null if table does not hold key.

Prototype

ajlong* ajTablelongFetchmod (
      AjPTable table,
      const ajlong* longkey
);

TypeNameRead/WriteDescription
AjPTabletableModifytable to search
const ajlong*longkeyInputkey to find.
ajlong* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Comparison functions

Functions:
ajTablelongCmpComparison function for a table with a long integer key
ajTablelongHashHash function for a table with a long integer key


Function ajTablelongCmp

Comparison function for a table with a long integer key

Prototype

ajint ajTablelongCmp (
      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 ajTablelongHash

Hash function for a table with a long integer key

Prototype

ajuint ajTablelongHash (
      const void* key,
      ajuint hashsize
);

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

From EMBOSS 6.4.0


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTablestrNewCreates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.
ajTablestrNewCaseCreates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.
ajTablestrNewCaseConstCreates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.
ajTablestrNewConstCreates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.


Function ajTablestrNew

Creates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.

Prototype

AjPTable ajTablestrNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 5.0.0


Function ajTablestrNewCase

Creates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.

Prototype

AjPTable ajTablestrNewCase (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 5.0.0


Function ajTablestrNewCaseConst

Creates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.

Prototype

AjPTable ajTablestrNewCaseConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


Function ajTablestrNewConst

Creates, initialises, and returns a new, empty table that can hold a specified number of key-value pairs.

Prototype

AjPTable ajTablestrNewConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


AjPTable: Destructors

Functions:
ajTablestrFreeFree keys and value strings in a table and free the table. Use only where the keys and strings in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.
ajTablestrFreeKeyFree string keys in a table and free the table. Do not free the values. Use only where the keys in the table are real strings, and not just copies of pointers. Otherwise a call to ajTableFree is enough. The data is simply freed.


Function ajTablestrFree

Free keys and value strings in a table and free the table. Use only where the keys and strings in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTablestrFree (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 5.0.0


Function ajTablestrFreeKey

Free string keys in a table and free the table. Do not free the values. Use only where the keys in the table are real strings, and not just copies of pointers. Otherwise a call to ajTableFree is enough. The data is simply freed.

Prototype

void ajTablestrFreeKey (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 5.0.0


AjPTable: Retrieval

Functions:
ajTablestrFetchCreturns the value associated with key in table, or null if table does not hold key.
ajTablestrFetchSreturns the value associated with key in table, or null if table does not hold key.
ajTablestrFetchkeyCreturns the key value associated with key in table, or null if table does not hold key.
ajTablestrFetchkeySreturns the key value associated with key in table, or null if table does not hold key.


Function ajTablestrFetchC

returns the value associated with key in table, or null if table does not hold key.

Prototype

void* ajTablestrFetchC (
      const AjPTable table,
      const char* txtkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const char*txtkeyInputkey to find.
void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTablestrFetchS

returns the value associated with key in table, or null if table does not hold key.

Prototype

void* ajTablestrFetchS (
      const AjPTable table,
      const AjPStr key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const AjPStrkeyInputkey to find.
void* RETURNvalue associated with key

From EMBOSS 6.4.0


Function ajTablestrFetchkeyC

returns the key value associated with key in table, or null if table does not hold key.

Prototype

const AjPStr ajTablestrFetchkeyC (
      const AjPTable table,
      const char* txtkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const char*txtkeyInputkey to find.
const AjPStr RETURNkey value as stored in the table

From EMBOSS 6.4.0


Function ajTablestrFetchkeyS

returns the key value associated with key in table, or null if table does not hold key.

Prototype

const AjPStr ajTablestrFetchkeyS (
      const AjPTable table,
      const AjPStr key
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const AjPStrkeyInputkey to find.
const AjPStr RETURNkey value as stored in the table

From EMBOSS 6.4.0


AjPTable: Modify

Functions:
ajTablestrFetchmodreturns the value associated with key in table, or null if table does not hold key.


Function ajTablestrFetchmod

returns the value associated with key in table, or null if table does not hold key.

Prototype

AjPStr* ajTablestrFetchmod (
      AjPTable table,
      const AjPStr key
);

TypeNameRead/WriteDescription
AjPTabletableModifytable to search
const AjPStrkeyInputkey to find.
AjPStr* RETURNvalue associated with key

From EMBOSS 6.0.0


AjPTable: Comparison functions

Functions:
ajTablestrCmpComparison function for a table with a string key
ajTablestrCmpCaseComparison function for a table with a string key and case insensitivity.
ajTablestrHashHash function for a table with a string key
ajTablestrHashCaseHash function for a table with a string key and case insensitivity.


Function ajTablestrCmp

Comparison function for a table with a string key

Prototype

ajint ajTablestrCmp (
      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 5.0.0


Function ajTablestrCmpCase

Comparison function for a table with a string key and case insensitivity.

Prototype

ajint ajTablestrCmpCase (
      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 5.0.0


Function ajTablestrHash

Hash function for a table with a string key

Prototype

ajuint ajTablestrHash (
      const void* key,
      ajuint hashsize
);

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

From EMBOSS 5.0.0


Function ajTablestrHashCase

Hash function for a table with a string key and case insensitivity.

Prototype

ajuint ajTablestrHashCase (
      const void* key,
      ajuint hashsize
);

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

From EMBOSS 5.0.0


AjPTable: Trace functions

Functions:
ajTablestrPrintPrint function for a table with a string key.
ajTablestrTraceWrites debug messages to trace the contents of a table, assuming all keys and values are strings.
ajTablestrTracekeysWrites debug messages to trace the keys of a string table, assuming all keys and values are strings.


Function ajTablestrPrint

Print function for a table with a string key.

Prototype

void ajTablestrPrint (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable.
void RETURN

From EMBOSS 5.0.0


Function ajTablestrTrace

Writes debug messages to trace the contents of a table, assuming all keys and values are strings.

Prototype

void ajTablestrTrace (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable
void RETURN

From EMBOSS 5.0.0


Function ajTablestrTracekeys

Writes debug messages to trace the keys of a string table, assuming all keys and values are strings.

Prototype

void ajTablestrTracekeys (
      const AjPTable table
);

TypeNameRead/WriteDescription
const AjPTabletableInputTable
void RETURN

From EMBOSS 6.4.0


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTableuintNewCreates, initialises, and returns a new, empty table that can hold a specified number of unsigned integer key-value pairs.
ajTableuintNewConstCreates, initialises, and returns a new, empty table that can hold a specified number of unsigned integer key-value pairs.


Function ajTableuintNew

Creates, initialises, and returns a new, empty table that can hold a specified number of unsigned integer key-value pairs.

Prototype

AjPTable ajTableuintNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


Function ajTableuintNewConst

Creates, initialises, and returns a new, empty table that can hold a specified number of unsigned integer key-value pairs.

Prototype

AjPTable ajTableuintNewConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


AjPTable: Destructors

Functions:
ajTableuintFreeFree keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.
ajTableuintFreeKeyFree keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.


Function ajTableuintFree

Free keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTableuintFree (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


Function ajTableuintFreeKey

Free keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTableuintFreeKey (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


AjPTable: Retrieval

Functions:
ajTableuintFetchreturns the value associated with key in table, or null if table does not hold key.


Function ajTableuintFetch

returns the value associated with key in table, or null if table does not hold key.

Prototype

const ajuint* ajTableuintFetch (
      const AjPTable table,
      const ajuint* uintkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const ajuint*uintkeyInputkey to find.
const ajuint* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Modify

Functions:
ajTableuintFetchmodreturns the value associated with key in table, or null if table does not hold key.


Function ajTableuintFetchmod

returns the value associated with key in table, or null if table does not hold key.

Prototype

ajuint* ajTableuintFetchmod (
      AjPTable table,
      const ajuint* uintkey
);

TypeNameRead/WriteDescription
AjPTabletableModifytable to search
const ajuint*uintkeyInputkey to find.
ajuint* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Comparison functions

Functions:
ajTableuintCmpComparison function for a table with an unsigned integer key
ajTableuintHashHash function for a table with an unsigned integer key


Function ajTableuintCmp

Comparison function for a table with an unsigned integer key

Prototype

ajint ajTableuintCmp (
      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 ajTableuintHash

Hash function for a table with an unsigned integer key

Prototype

ajuint ajTableuintHash (
      const void* key,
      ajuint hashsize
);

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

From EMBOSS 6.4.0


AjPTable: Constructors

Constructors for hash tables

Functions:
ajTableulongNewCreates, initialises, and returns a new, empty table that can hold an arbitrary number of unsigned long integer key-value pairs
ajTableulongNewConstCreates, initialises, and returns a new, empty table that can hold an arbitrary number of unsigned long integer key-value pairs


Function ajTableulongNew

Creates, initialises, and returns a new, empty table that can hold an arbitrary number of unsigned long integer key-value pairs

Prototype

AjPTable ajTableulongNew (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


Function ajTableulongNewConst

Creates, initialises, and returns a new, empty table that can hold an arbitrary number of unsigned long integer key-value pairs

Prototype

AjPTable ajTableulongNewConst (
      ajuint size
);

TypeNameRead/WriteDescription
ajuintsizeInputestimate of number of unique keys
AjPTable RETURNnew table.

From EMBOSS 6.4.0


AjPTable: Destructors

Functions:
ajTableulongFreeFree keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.
ajTableulongFreeKeyFree keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.


Function ajTableulongFree

Free keys and value strings in a table and free the table. Use only where the keys and data in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTableulongFree (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


Function ajTableulongFreeKey

Free keys and value strings in a table and free the table. Use only where the keys in the table are real, and not just copies of pointers. Otherwise a call to ajTableFree is enough.

Prototype

void ajTableulongFreeKey (
      AjPTable* Ptable
);

TypeNameRead/WriteDescription
AjPTable*PtableDeleteTable
void RETURN

From EMBOSS 6.4.0


AjPTable: Retrieval

Functions:
ajTableulongFetchreturns the value associated with key in table, or null if table does not hold key.


Function ajTableulongFetch

returns the value associated with key in table, or null if table does not hold key.

Prototype

const ajulong* ajTableulongFetch (
      const AjPTable table,
      const ajulong* ulongkey
);

TypeNameRead/WriteDescription
const AjPTabletableInputtable to search
const ajulong*ulongkeyInputkey to find.
const ajulong* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Modify

Functions:
ajTableulongFetchmodReturns the value associated with key in table, or null if table does not hold key.


Function ajTableulongFetchmod

Returns the value associated with key in table, or null if table does not hold key.

Prototype

ajulong* ajTableulongFetchmod (
      AjPTable table,
      const ajulong* ulongkey
);

TypeNameRead/WriteDescription
AjPTabletableModifytable to search
const ajulong*ulongkeyInputkey to find.
ajulong* RETURNvalue associated with key

From EMBOSS 6.4.0


AjPTable: Comparison functions

Functions:
ajTableulongCmpComparison function for a table with an unsigned long integer key
ajTableulongHashHash function for a table with an unsigned long integer key


Function ajTableulongCmp

Comparison function for a table with an unsigned long integer key

Prototype

ajint ajTableulongCmp (
      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 ajTableulongHash

Hash function for a table with an unsigned long integer key

Prototype

ajuint ajTableulongHash (
      const void* key,
      ajuint hashsize
);

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

From EMBOSS 6.4.0