#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <time.h>
#include "mode.h"
#include "ichicano.h"
#include "ichicomn.h"
#include "ichitime.h"
#include "bcf_s.h"
Data Structures | |
struct | tagUnorderedPartition |
struct | tagCell |
struct | tagTransposition |
struct | tagCTable |
struct | tagkLeast |
struct | tagNodeValues |
Typedefs | |
typedef AT_NUMB | Node |
typedef NEIGH_LIST | Graph |
typedef struct tagUnorderedPartition | UnorderedPartition |
typedef struct tagCell | Cell |
typedef struct tagTransposition | Transposition |
typedef struct tagCTable | ConTable |
typedef struct tagkLeast | kLeast |
typedef struct tagNodeValues | NV |
Functions | |
int | CanonGraph (struct tagINCHI_CLOCK *ic, CANON_GLOBALS *pCG, int n, int n_tg, int n_max, int bDigraph, Graph *G, Partition pi[], AT_RANK *nSymmRank, AT_RANK *nCanonRank, AT_NUMB *nAtomNumberCanon, CANON_DATA *pCD, CANON_COUNTS *pCC, ConTable **pp_zb_rho_inp, ConTable **pp_zb_rho_out, int LargeMolecules) |
void | CtPartFill (Graph *G, CANON_DATA *pCD, Partition *p, ConTable *Ct, int k, int n, int n_tg, int n_max) |
void | CtPartClear (ConTable *Ct, int k) |
void | CtPartINCHI_CANON_INFINITY (ConTable *Ct, S_CHAR *cmp, int k) |
int | CtPartCompare (ConTable *Ct1, ConTable *Ct2, S_CHAR *cmp, kLeast *kLeastForLayer, int k, int bOnlyCommon, int bSplitTautCompare) |
int | CtFullCompare (ConTable *Ct1, ConTable *Ct2, int bOnlyCommon, int bSplitTautCompare) |
void | CtPartCopy (ConTable *Ct1, ConTable *Ct2, int k) |
void | CtFullCopy (ConTable *Ct1, ConTable *Ct2) |
int | CtFullCompareLayers (kLeast *kLeastForLayer) |
int | CtCompareLayersGetFirstDiff (kLeast *kLeast_rho, int nOneAdditionalLayer, int *L_rho, int *I_rho, int *k_rho) |
int | CtPartCompareLayers (kLeast *kLeast_rho, int L_rho_fix_prev, int nOneAdditionalLayer) |
void | UpdateCompareLayers (kLeast kLeastForLayer[], int hzz) |
int | GetOneAdditionalLayer (CANON_DATA *pCD, ConTable *pzb_rho_fix) |
void | CleanNumH (NUM_H *NumH, int len) |
int | CleanCt (AT_RANK *Ct, int len) |
void | CleanIsoSortKeys (AT_ISO_SORT_KEY *isk, int len) |
void | MergeCleanIsoSortKeys (AT_ISO_SORT_KEY *isk1, AT_ISO_SORT_KEY *isk2, int len) |
int | UnorderedPartitionJoin (UnorderedPartition *p1, UnorderedPartition *p2, int n) |
Node | GetUnorderedPartitionMcrNode (UnorderedPartition *p1, Node v) |
int | nJoin2Mcrs2 (AT_RANK *nEqArray, AT_RANK n1, AT_RANK n2) |
AT_RANK | nGetMcr2 (AT_RANK *nEqArray, AT_RANK n) |
int | AllNodesAreInSet (NodeSet *cur_nodes, int lcur_nodes, NodeSet *set, int lset) |
void | NodeSetFromVertices (CANON_GLOBALS *pCG, NodeSet *cur_nodes, int l, Node *v, int num_v) |
void | CellMakeEmpty (Cell *baseW, int k) |
Node | CellGetMinNode (Partition *p, Cell *W, Node v, CANON_DATA *pCD) |
int | CellGetNumberOfNodes (Partition *p, Cell *W) |
int | CellIntersectWithSet (struct tagCANON_GLOBALS *pCG, Partition *p, Cell *W, NodeSet *Mcr, int l) |
int | PartitionColorVertex (CANON_GLOBALS *pCG, Graph *G, Partition *p, Node v, int n, int n_tg, int n_max, int bDigraph, int nNumPrevRanks) |
void | PartitionCopy (Partition *To, Partition *From, int n) |
int | PartitionSatisfiesLemma_2_25 (Partition *p, int n) |
void | PartitionGetTransposition (Partition *pFrom, Partition *pTo, int n, Transposition *gamma) |
void | PartitionGetMcrAndFixSet (CANON_GLOBALS *pCG, Partition *p, NodeSet *Mcr, NodeSet *Fix, int n, int l) |
int | PartitionGetFirstCell (Partition *p, Cell *baseW, int k, int n) |
int | PartitionIsDiscrete (Partition *p, int n) |
void | PartitionFree (Partition *p) |
int | PartitionCreate (Partition *p, int n) |
void | UnorderedPartitionMakeDiscrete (UnorderedPartition *p, int n) |
void | UnorderedPartitionFree (UnorderedPartition *p) |
int | UnorderedPartitionCreate (UnorderedPartition *p, int n) |
void | CTableFree (ConTable *Ct) |
int | CTableCreate (ConTable *Ct, int n, CANON_DATA *pCD) |
void | TranspositionFree (Transposition *p) |
int | TranspositionCreate (Transposition *p, int n) |
void | TranspositionGetMcrAndFixSetAndUnorderedPartition (struct tagCANON_GLOBALS *pCG, Transposition *gamma, NodeSet *McrSet, NodeSet *FixSet, int n, int l, UnorderedPartition *p) |
void | insertions_sort_NeighList_AT_NUMBERS2 (NEIGH_LIST base, AT_RANK *nRank, AT_RANK max_rj) |
int | WriteGraph (Graph *G, int n, int gnum, char *fname, char *fmode) |
int | SetInitialRanks2 (int num_atoms, ATOM_INVARIANT2 *pAtomInvariant2, AT_RANK *nNewRank, AT_RANK *nAtomNumber, CANON_GLOBALS *pCG) |
void | FillOutAtomInvariant2 (sp_ATOM *at, int num_atoms, int num_at_tg, ATOM_INVARIANT2 *pAtomInvariant, int bIgnoreIsotopic, int bHydrogensInRanks, int bHydrogensFixedInRanks, int bDigraph, int bTautGroupsOnly, T_GROUP_INFO *t_group_info) |
int | GetCanonRanking2 (int num_atoms, int num_at_tg, int num_max, int bDigraph, sp_ATOM *at, AT_RANK **pRankStack, int nNumPrevRanks, AT_RANK *nSymmRank, AT_RANK *nCanonRank, NEIGH_LIST *NeighList, AT_RANK *nTempRank, CANON_STAT *pCS) |
int | NodeSetCreate (struct tagCANON_GLOBALS *pCG, NodeSet *pSet, int n, int L) |
void | NodeSetFree (struct tagCANON_GLOBALS *pCG, NodeSet *pSet) |
void | NodeSetFromRadEndpoints (CANON_GLOBALS *pCG, NodeSet *cur_nodes, int k, Vertex RadEndpoints[], int num_v) |
void | RemoveFromNodeSet (CANON_GLOBALS *pCG, NodeSet *cur_nodes, int k, Vertex v[], int num_v) |
int | DoNodeSetsIntersect (NodeSet *cur_nodes, int k1, int k2) |
int | IsNodeSetEmpty (NodeSet *cur_nodes, int k) |
void | AddNodeSet2ToNodeSet1 (NodeSet *cur_nodes, int k1, int k2) |
int | AddNodesToRadEndpoints (CANON_GLOBALS *pCG, NodeSet *cur_nodes, int k, Vertex RadEndpoints[], Vertex vRad, int nStart, int nLen) |
int | SetBitCreate (CANON_GLOBALS *pCG) |
int | SetBitFree (CANON_GLOBALS *pCG) |
void | DeAllocBCN (BCN *pBCN) |
int | GetBaseCanonRanking (INCHI_CLOCK *ic, int num_atoms, int num_at_tg, sp_ATOM *at[], T_GROUP_INFO *t_group_info, ATOM_SIZES s[], BCN *pBCN, struct tagInchiTime *ulTimeOutTime, CANON_GLOBALS *pCG, int bFixIsoFixedH, int LargeMolecules) |
Variables | |
static AT_NUMB | rank_mark_bit |
static AT_NUMB | rank_mask_bit |
#define BASE_H_NUMBER ((INCHI_CANON_INFINITY-1)/2) |
#define CanonGraph01 CanonGraph |
#define CanonGraph02 CanonGraph |
#define CanonGraph03 CanonGraph |
#define CanonGraph04 CanonGraph |
#define CanonGraph05 CanonGraph |
#define CanonGraph06 CanonGraph |
#define CanonGraph07 CanonGraph |
#define CanonGraph08 CanonGraph |
#define CanonGraph09 CanonGraph |
#define CanonGraph10 CanonGraph |
#define CanonGraph11 CanonGraph |
#define CanonGraph12 CanonGraph |
#define ELEM_NAME_LEN 2 |
#define EMPTY_CT 0 |
#define EMPTY_H_NUMBER (INCHI_CANON_INFINITY-1) |
#define EMPTY_ISO_SORT_KEY LONG_MAX |
#define FREE_ARRAY | ( | X | ) | if (X) inchi_free( X); |
#define FREE_ARRAY | ( | X | ) | if (X) inchi_free( X); |
#define FREE_CONTABLE | ( | X | ) | if (X) {CTableFree( X);inchi_free( X);} |
#define FREE_CONTABLE | ( | X | ) | if (X) {CTableFree( X);inchi_free( X);} |
#define INCHI_CANON_INFINITY 0x7FFF |
#define INCHI_CANON_MIN |
#define MAX_CELLS 32766 |
#define MAX_LAYERS 100 |
#define MAX_NODES 32766 |
#define MAX_SET_SIZE 32766 /*16384*/ |
#define NORMALLY_ALLOWED_MAX_SET_SIZE 2048 |
#define QZFIX_OK | ( | X | ) | ((X)<=0) |
#define SEPARATE_CANON_CALLS 0 |
typedef NEIGH_LIST Graph |
typedef struct tagNodeValues NV |
typedef struct tagTransposition Transposition |
typedef struct tagUnorderedPartition UnorderedPartition |
void AddNodeSet2ToNodeSet1 | ( | NodeSet * | cur_nodes, |
int | k1, | ||
int | k2 | ||
) |
int AddNodesToRadEndpoints | ( | CANON_GLOBALS * | pCG, |
NodeSet * | cur_nodes, | ||
int | k, | ||
Vertex | RadEndpoints[], | ||
Vertex | vRad, | ||
int | nStart, | ||
int | nLen | ||
) |
int CanonGraph | ( | struct tagINCHI_CLOCK * | ic, |
CANON_GLOBALS * | pCG, | ||
int | n, | ||
int | n_tg, | ||
int | n_max, | ||
int | bDigraph, | ||
Graph * | G, | ||
Partition | pi[], | ||
AT_RANK * | nSymmRank, | ||
AT_RANK * | nCanonRank, | ||
AT_NUMB * | nAtomNumberCanon, | ||
CANON_DATA * | pCD, | ||
CANON_COUNTS * | pCC, | ||
ConTable ** | pp_zb_rho_inp, | ||
ConTable ** | pp_zb_rho_out, | ||
int | LargeMolecules | ||
) |
Node CellGetMinNode | ( | Partition * | p, |
Cell * | W, | ||
Node | v, | ||
CANON_DATA * | pCD | ||
) |
int CellIntersectWithSet | ( | struct tagCANON_GLOBALS * | pCG, |
Partition * | p, | ||
Cell * | W, | ||
NodeSet * | Mcr, | ||
int | l | ||
) |
void CellMakeEmpty | ( | Cell * | baseW, |
int | k | ||
) |
int CleanCt | ( | AT_RANK * | Ct, |
int | len | ||
) |
void CleanIsoSortKeys | ( | AT_ISO_SORT_KEY * | isk, |
int | len | ||
) |
void CleanNumH | ( | NUM_H * | NumH, |
int | len | ||
) |
int CTableCreate | ( | ConTable * | Ct, |
int | n, | ||
CANON_DATA * | pCD | ||
) |
void CTableFree | ( | ConTable * | Ct | ) |
int CtCompareLayersGetFirstDiff | ( | kLeast * | kLeast_rho, |
int | nOneAdditionalLayer, | ||
int * | L_rho, | ||
int * | I_rho, | ||
int * | k_rho | ||
) |
int CtFullCompareLayers | ( | kLeast * | kLeastForLayer | ) |
void CtPartClear | ( | ConTable * | Ct, |
int | k | ||
) |
int CtPartCompare | ( | ConTable * | Ct1, |
ConTable * | Ct2, | ||
S_CHAR * | cmp, | ||
kLeast * | kLeastForLayer, | ||
int | k, | ||
int | bOnlyCommon, | ||
int | bSplitTautCompare | ||
) |
int CtPartCompareLayers | ( | kLeast * | kLeast_rho, |
int | L_rho_fix_prev, | ||
int | nOneAdditionalLayer | ||
) |
void CtPartFill | ( | Graph * | G, |
CANON_DATA * | pCD, | ||
Partition * | p, | ||
ConTable * | Ct, | ||
int | k, | ||
int | n, | ||
int | n_tg, | ||
int | n_max | ||
) |
void DeAllocBCN | ( | BCN * | pBCN | ) |
int DoNodeSetsIntersect | ( | NodeSet * | cur_nodes, |
int | k1, | ||
int | k2 | ||
) |
void FillOutAtomInvariant2 | ( | sp_ATOM * | at, |
int | num_atoms, | ||
int | num_at_tg, | ||
ATOM_INVARIANT2 * | pAtomInvariant, | ||
int | bIgnoreIsotopic, | ||
int | bHydrogensInRanks, | ||
int | bHydrogensFixedInRanks, | ||
int | bDigraph, | ||
int | bTautGroupsOnly, | ||
T_GROUP_INFO * | t_group_info | ||
) |
int GetBaseCanonRanking | ( | INCHI_CLOCK * | ic, |
int | num_atoms, | ||
int | num_at_tg, | ||
sp_ATOM * | at[], | ||
T_GROUP_INFO * | t_group_info, | ||
ATOM_SIZES | s[], | ||
BCN * | pBCN, | ||
struct tagInchiTime * | ulTimeOutTime, | ||
CANON_GLOBALS * | pCG, | ||
int | bFixIsoFixedH, | ||
int | LargeMolecules | ||
) |
int GetCanonRanking2 | ( | int | num_atoms, |
int | num_at_tg, | ||
int | num_max, | ||
int | bDigraph, | ||
sp_ATOM * | at, | ||
AT_RANK ** | pRankStack, | ||
int | nNumPrevRanks, | ||
AT_RANK * | nSymmRank, | ||
AT_RANK * | nCanonRank, | ||
NEIGH_LIST * | NeighList, | ||
AT_RANK * | nTempRank, | ||
CANON_STAT * | pCS | ||
) |
int GetOneAdditionalLayer | ( | CANON_DATA * | pCD, |
ConTable * | pzb_rho_fix | ||
) |
Node GetUnorderedPartitionMcrNode | ( | UnorderedPartition * | p1, |
Node | v | ||
) |
void insertions_sort_NeighList_AT_NUMBERS2 | ( | NEIGH_LIST | base, |
AT_RANK * | nRank, | ||
AT_RANK | max_rj | ||
) |
int IsNodeSetEmpty | ( | NodeSet * | cur_nodes, |
int | k | ||
) |
void MergeCleanIsoSortKeys | ( | AT_ISO_SORT_KEY * | isk1, |
AT_ISO_SORT_KEY * | isk2, | ||
int | len | ||
) |
int NodeSetCreate | ( | struct tagCANON_GLOBALS * | pCG, |
NodeSet * | pSet, | ||
int | n, | ||
int | L | ||
) |
void NodeSetFree | ( | struct tagCANON_GLOBALS * | pCG, |
NodeSet * | pSet | ||
) |
void NodeSetFromRadEndpoints | ( | CANON_GLOBALS * | pCG, |
NodeSet * | cur_nodes, | ||
int | k, | ||
Vertex | RadEndpoints[], | ||
int | num_v | ||
) |
void NodeSetFromVertices | ( | CANON_GLOBALS * | pCG, |
NodeSet * | cur_nodes, | ||
int | l, | ||
Node * | v, | ||
int | num_v | ||
) |
int PartitionColorVertex | ( | CANON_GLOBALS * | pCG, |
Graph * | G, | ||
Partition * | p, | ||
Node | v, | ||
int | n, | ||
int | n_tg, | ||
int | n_max, | ||
int | bDigraph, | ||
int | nNumPrevRanks | ||
) |
int PartitionCreate | ( | Partition * | p, |
int | n | ||
) |
void PartitionFree | ( | Partition * | p | ) |
void PartitionGetMcrAndFixSet | ( | CANON_GLOBALS * | pCG, |
Partition * | p, | ||
NodeSet * | Mcr, | ||
NodeSet * | Fix, | ||
int | n, | ||
int | l | ||
) |
void PartitionGetTransposition | ( | Partition * | pFrom, |
Partition * | pTo, | ||
int | n, | ||
Transposition * | gamma | ||
) |
int PartitionIsDiscrete | ( | Partition * | p, |
int | n | ||
) |
int PartitionSatisfiesLemma_2_25 | ( | Partition * | p, |
int | n | ||
) |
void RemoveFromNodeSet | ( | CANON_GLOBALS * | pCG, |
NodeSet * | cur_nodes, | ||
int | k, | ||
Vertex | v[], | ||
int | num_v | ||
) |
int SetBitCreate | ( | CANON_GLOBALS * | pCG | ) |
int SetBitFree | ( | CANON_GLOBALS * | pCG | ) |
int SetInitialRanks2 | ( | int | num_atoms, |
ATOM_INVARIANT2 * | pAtomInvariant2, | ||
AT_RANK * | nNewRank, | ||
AT_RANK * | nAtomNumber, | ||
CANON_GLOBALS * | pCG | ||
) |
int TranspositionCreate | ( | Transposition * | p, |
int | n | ||
) |
void TranspositionFree | ( | Transposition * | p | ) |
void TranspositionGetMcrAndFixSetAndUnorderedPartition | ( | struct tagCANON_GLOBALS * | pCG, |
Transposition * | gamma, | ||
NodeSet * | McrSet, | ||
NodeSet * | FixSet, | ||
int | n, | ||
int | l, | ||
UnorderedPartition * | p | ||
) |
int UnorderedPartitionCreate | ( | UnorderedPartition * | p, |
int | n | ||
) |
void UnorderedPartitionFree | ( | UnorderedPartition * | p | ) |
int UnorderedPartitionJoin | ( | UnorderedPartition * | p1, |
UnorderedPartition * | p2, | ||
int | n | ||
) |
void UnorderedPartitionMakeDiscrete | ( | UnorderedPartition * | p, |
int | n | ||
) |
void UpdateCompareLayers | ( | kLeast | kLeastForLayer[], |
int | hzz | ||
) |
int WriteGraph | ( | Graph * | G, |
int | n, | ||
int | gnum, | ||
char * | fname, | ||
char * | fmode | ||
) |
|
static |
|
static |