src/HSLib/SpinOp.cc
/* This set of functions deals with specification of sub-space Hilbert space.
   Each composite spin operator is associated with a set of spins and each
   spin resides in a spin Hilbert space.  These spin Hilbert spaces are kept
   in each SOp in the array Hspaces.  Unless there is NO operator, these
   dimensions will be maintained, regardless if SOp sub-space arrays exist.
   The total (full space) SOp dimension is the produce of these sub-spaces.
   The sub-space dimensions are set during construction from:

		1. From an input array of (sub-space) matrices
		2. From another input spin operator                          */
This set of functions deals with specification of sub-space Hilbert space.
Each composite spin operator is associated with a set of spins and each
spin resides in a spin Hilbert space.  These spin Hilbert spaces are kept
in each SOp in the array Hspaces.  Unless there is NO operator, these
dimensions will be maintained, regardless if SOp sub-space arrays exist.
The total (full space) SOp dimension is the produce of these sub-spaces.
The sub-space dimensions are set during construction from.

1. From an input array of (sub-space) matrices
2. From another input spin operator
This set of functions deals with specification of sub - space Hilbert space . Each composite spin operator is associated with a set of spins and each spin resides in a spin Hilbert space . These spin Hilbert spaces are kept in each SOp in the array Hspaces . Unless there is NO operator these dimensions will be maintained regardless if SOp sub - space arrays exist . The total ( full space ) SOp dimension is the produce of these sub - spaces . The sub - space dimensions are set during construction from . 1 . From an input array of ( sub - space ) matrices 2 . From another input spin operator
void spin_op::CopySubSpaces(matrix* prmxs)
  {
  if(Hspaces) delete [] Hspaces;
  if(!nspins) Hspaces = NULL;
  else        Hspaces = new int[nspins];
  for(int i=0; i<nspins; i++) Hspaces[i] = (prmxs[i]).rows(); 
  }
void spin_op :: CopySubSpaces ( matrix * prmxs ) { if ( Hspaces ) delete [ ] Hspaces ; if ( ! nspins ) Hspaces = NULL ; else Hspaces = new int [ nspins ] ; for ( int i = 0 ; i < nspins ; i ++ ) Hspaces [ i ] = ( prmxs [ i ] ) . rows ( ) ; }
This set of functions deals with specification of sub-space Hilbert space.
This set of functions deals with specification of sub - space Hilbert space .