Tensor Network Theory Library
Beta release 1.1.1
A library of routines for performing TNTbased operations

These functions can be used to get the properties of a node or information about connections between nodes in a network. They do not alter the properties of the node.
Functions  
tntNode  tntNodeFindConn (tntNode A, tntLegLabel legA) 
tntNode  tntNodeFindFirst (tntNetwork nw) 
tntNode  tntNodeFindLast (tntNetwork nw) 
tntComplexArray  tntNodeGetDiag (tntNode A, tntLegLabel rowlegs, tntLegLabel collegs) 
tntComplex  tntNodeGetFirstEl (tntNode A) 
unsigned  tntNodeGetLegDim (tntNode A, tntLegLabel legA) 
int  tntNodeGetLegDir (tntNode A, tntLegLabel legA) 
double  tntNodeGetNorm (tntNode A) 
tntComplex  tntNodeGetTrace (tntNode A, tntLegLabel rowlegs, tntLegLabel collegs) 
unsigned  tntNodeIsCovariant (tntNode A) 
unsigned  tntNodeIsFunctional (tntNode A) 
void  tntNodePrintAll (tntNode A) 
void  tntNodePrintAsMatrix (tntNode A, tntLegLabel rowlegs, tntLegLabel collegs) 
void  tntNodePrintInfo (tntNode A) 
tntNode tntNodeFindConn  (  tntNode  A, 
tntLegLabel  legA  
) 
Finds the node that is connected to legA
of the node \(A\) that is passed as an argument. It will return NULL if there is nothing connected to this leg.
A  The node to find the connection of 
legA  The leg of the node \(A\) to find the connection of 
Definition at line 29 of file tntNodeInfo.c.
tntNode tntNodeFindFirst  (  tntNetwork  nw  ) 
Identifies the first node in the network.
Definition at line 50 of file tntNodeInfo.c.
tntNode tntNodeFindLast  (  tntNetwork  nw  ) 
Identifies the last node in the network.
Definition at line 66 of file tntNodeInfo.c.
tntComplexArray tntNodeGetDiag  (  tntNode  A, 
tntLegLabel  rowlegs,  
tntLegLabel  collegs  
) 
Gets the diagonal values of a matrix formed by reshaping the tensor corresponding to the node \(A\). The legs that are assigned to each of the dimensions of the matrix are given as arguments, where the first leg corresponds to the fastest moving index. The resulting matrix must be square, and if it is not the function exits with an error. The values returned are in complex format even if the tensor values are purely real. The diagonal values are returned in an array of type ::tntComplexArray which should be freed using tntComplexArrayFree() when no longer required.
A  Node to get the trace of 
rowlegs  List of legs making up the rows of the matrix 
collegs  List of legs making up the columns of the matrix 
Definition at line 141 of file tntNodeInfo.c.
tntComplex tntNodeGetFirstEl  (  tntNode  A  ) 
Gets the first element in the tensor corresponding to the node \(A\). The value returned is in complex format even if the tensor values are purely real.
Definition at line 82 of file tntNodeInfo.c.
unsigned tntNodeGetLegDim  (  tntNode  A, 
tntLegLabel  legA  
) 
Returns the dimension of the specified leg of the node \(A\). If the leg does not exist an error will result.
A  The node to get the dimension of. 
legA  The leg of the node to get the dimension of. 
Definition at line 209 of file tntNodeInfo.c.
int tntNodeGetLegDir  (  tntNode  A, 
tntLegLabel  legA  
) 
Gets the direction of a given leg, which is used when determining quantum number blocks. The value taken will be TNT_QN_IN if it is an incoming leg, TNT_QN_OUT if it is an outgoing leg, and 0 if there is no quantum number information set on the leg.
A  Node to get quantum number information from. 
legA  Leg to get quantum number information from. 
Definition at line 258 of file tntNodeInfo.c.
double tntNodeGetNorm  (  tntNode  A  ) 
Calculates the norm of the node \(A\) defined as the square root as the squared sum of all the tensor values i.e. the Euclidean norm of the vector forming the array of all tensor elements.
Definition at line 517 of file tntNodeInfo.c.
tntComplex tntNodeGetTrace  (  tntNode  A, 
tntLegLabel  rowlegs,  
tntLegLabel  collegs  
) 
Gets the trace of a matrix formed by reshaping the tensor corresponding to the node \(A\). The legs that are assigned to each of the dimensions of the matrix are given as arguments, where the first leg corresponds to the fastest moving index. The resulting matrix must be square, and if it is not the function exits with an error. The value returned is in complex format even if the tensor values are purely real.
A  Node to get the trace of 
rowlegs  List of legs making up the rows of the matrix 
collegs  List of legs making up the columns of the matrix 
Definition at line 106 of file tntNodeInfo.c.
unsigned tntNodeIsCovariant  (  tntNode  A  ) 
Checks whether the node \(A\) is covariant under the system type set i.e. whether quantum numbers have been assigned to all the indices, and whether the elements are being stored in blocked form.
Definition at line 498 of file tntNodeInfo.c.
unsigned tntNodeIsFunctional  (  tntNode  A  ) 
Checks whether the node \(A\) is a functional node or a static node.
Definition at line 484 of file tntNodeInfo.c.
void tntNodePrintAll  (  tntNode  A  ) 
Prints information about the node \(A\), as well as the values. To print information only use tntNodePrintAll() or to have the values reshaped to your choosing, use tntNodePrintAsMatrix();
Definition at line 317 of file tntNodeInfo.c.
void tntNodePrintAsMatrix  (  tntNode  A, 
tntLegLabel  rowlegs,  
tntLegLabel  collegs  
) 
Prints a node with any number of legs as a matrix. The legs that are assigned to each of the dimensions of the matrix are given as arguments, where the first leg corresponds to the fastest moving index.
A  Node to print. 
rowlegs  List of legs making up the rows of the matrix 
collegs  List of legs making up the columns of the matrix 
Definition at line 172 of file tntNodeInfo.c.
void tntNodePrintInfo  (  tntNode  A  ) 
Prints information about the node \(A\), but not the values. To print the matrix values too, use tntNodePrintAll() or tntNodePrintAsMatrix();
A  The node to print information for. 
Definition at line 310 of file tntNodeInfo.c.