src/MultiSys/ExProcess.cc
/* The next function returns a vector of strings that indicate the spin mappings
   that are active in the exchange process. Each string will involve one spin
   of a LHS component exchanging with one spin of the RHS component. Each string
   will be of the same length and appear something like

                                   A 0 <---> B 1

   where here A is the LHS component and 0 its spin, while B is a RHS component
   with 1 being its spin.                                                         */
The next function returns a vector of strings that indicate the spin mappings
that are active in the exchange process. Each string will involve one spin
of a LHS component exchanging with one spin of the RHS component. Each string
will be of the same length and appear something like




The next function returns a vector of strings that indicate the spin mappings that are active in the exchange process . Each string will involve one spin of a LHS component exchanging with one spin of the RHS component . Each string will be of the same length and appear something like
vector<string> ExchProc::SpinMapStrs() const
  {
  vector<string> SpMaps;			
  int c1, c2;                                   
  int s1, s2;                                   
  string middle(" <---> ");                     
  string line;					
  int nm = NSpinMaps();				
  unsigned id = 1;                              
  if(nm > 9)  id++;				
  if(nm > 99) id++;				
  for(int i=0; i<nm; i++)                       
    {
    c1 = SpinMaps[i].Sub1();			
    c2 = SpinMaps[i].Sub2();			
    s1 = SpinMaps[i].Spin1();			
    s2 = SpinMaps[i].Spin2();			
    line  = ExchProc::Label(c1);		
    line += string(" ") + Gdec(s1, id);		
    line += middle;				
    line += ExchProc::Label(c2);		
    line += string(" ") + Gdec(s2, id);		
    SpMaps.push_back(line);			
    }
  return SpMaps;				
  }
vector < string > ExchProc :: SpinMapStrs ( ) const { vector < string > SpMaps ; int c1 , c2 ; int s1 , s2 ; string middle ( " " ) ; string line ; int nm = NSpinMaps ( ) ; unsigned id = 1 ; if ( nm > 9 ) id ++ ; if ( nm > 99 ) id ++ ; for ( int i = 0 ; i < nm ; i ++ ) { c1 = SpinMaps [ i ] . Sub1 ( ) ; c2 = SpinMaps [ i ] . Sub2 ( ) ; s1 = SpinMaps [ i ] . Spin1 ( ) ; s2 = SpinMaps [ i ] . Spin2 ( ) ; line = ExchProc :: Label ( c1 ) ; line += string ( " " ) + Gdec ( s1 , id ) ; line += middle ; line += ExchProc :: Label ( c2 ) ; line += string ( " " ) + Gdec ( s2 , id ) ; SpMaps . push_back ( line ) ; } return SpMaps ; }
The next function returns a vector of strings that indicate the spin mappings
that are active in the exchange process.
The next function returns a vector of strings that indicate the spin mappings that are active in the exchange process .
// Strings to be returned // Component indices // Spin indices // Separator between LHS & RHS // A single line in return // # of spin maps in process // Size of spin index used // Adjust this within reason // (assumed < 1000 spins!) // Loop over spin pairs //   Get 1st component index //   Get 2nd component index //   Get 1st spin      index //   Get 2nd spin      index //   Set line to LHS component //   Add LHS spin to line //   Add in middle divider //   Add RHS component to line //   Add RHS spin to line //   Store line in array // Return the array