src/HSLib/SpinOp.cc
// Input		SOp	: Spin operator (this)
// Return		void    : The full Hilbert space matrix
//			          representaion of SOp is produced
//				  if it does not already exist.
// Note				: A 1x1 I matrix is the default "mx" &
//				  flags that the true mx isn't present
// Note				: Nothing is done if full mx exists
// Note				: If the spin operator is truely NULL
//				  we do nothing anyway since the stored
//				  full space mx is for I=0 & a bit odd
// sosi				: Hopefully the tensor_product function
//				  takes into account matrix structure?
//				  But this forces the issue anyway!
Input          SOp     : Spin operator (this)
Return         void    : The full Hilbert space matrix
representaion of SOp is produced
if it does not already exist.
Note                           : A 1x1 I matrix is the default "mx" &
flags that the true mx isn't present
Note                           : Nothing is done if full mx exists
Note                           : If the spin operator is truely NULL
we do nothing anyway since the stored
full space mx is for I=0 & a bit odd
sosi                           : Hopefully the tensor_product function
takes into account matrix structure.
But this forces the issue anyway!
Input SOp : Spin operator ( this ) Return void : The full Hilbert space matrix representaion of SOp is produced if it does not already exist . Note : A 1x1 I matrix is the default " mx " & flags that the true mx isn ' t present Note : Nothing is done if full mx exists Note : If the spin operator is truely NULL we do nothing anyway since the stored full space mx is for I = 0 & a bit odd sosi : Hopefully the tensor_product function takes into account matrix structure . But this forces the issue anyway!
void spin_op::blow_up() const
  {
  if(mx.rows() == 1)			
    {					
    if(pr == NULL)			
      {					
      int hs = HS();
      mx = matrix(hs,hs,complex0,d_matrix_type);
      }
    else if(nspins == 1)		
      mx = pr[0];			
    else				
      {					
      for(int i=0; i<nspins; i++) 	
	mx = tensor_product(mx,pr[i]);	
      }
    }
  }
void spin_op :: blow_up ( ) const { if ( mx . rows ( ) == 1 ) { if ( pr == NULL ) { int hs = HS ( ) ; mx = matrix ( hs , hs , complex0 , d_matrix_type ) ; } else if ( nspins == 1 ) mx = pr [ 0 ] ; else { for ( int i = 0 ; i < nspins ; i ++ ) mx = tensor_product ( mx , pr [ i ] ) ; } } }
Input          SOp     : Spin operator (this)
Return         void    : The full Hilbert space matrix
representaion of SOp is produced
if it does not already exist.
Input SOp : Spin operator ( this ) Return void : The full Hilbert space matrix representaion of SOp is produced if it does not already exist .
// "Blow Up" only if not already done //  as indicated by a 1x1 I matrix //   1.)If no single spin arrays //	then full array is a zero matrix //   2.)If 1 spin, full array is just  //      first sub-space array //   3.)If single spin arrays, perform  //	a tensor product to generate // 	full space array representation //	Initial mx is 1x1 I matrix