src/IntRank2/IntQuadVec.cc
// ---------------------------------------------------------------------------- 
//    Functions To Set Quadrupolar Interactions From Single Index Parameters
// ---------------------------------------------------------------------------- 
Functions To Set Quadrupolar Interactions From Single Index Parameters
Functions To Set Quadrupolar Interactions From Single Index Parameters
int IntQuadVec::getNInts(const ParameterSet& pset, int idx) const
  {
  string pnameb("gxx(");			
  string pnamee(")");				
  string pfx;					
  string sfx;					
  if(idx >= 0)					
    {
    pfx = string("[")+Gdec(idx)+string("]");
    pnameb = pfx + pnameb;
    }
  int nd = 0;					
  string pname = pnameb + Gdec(nd) + pnamee;	
  ParameterSet::const_iterator item;		
  item = pset.seek(pname);			
  while(item!=pset.end() && nd<500)		
    {
    nd ++;					
    pname = pnameb + Gdec(nd) + pnamee;		
    item = pset.seek(pname);			
    }
  return nd;
  }
int IntQuadVec :: getNInts ( const ParameterSet & pset , int idx ) const { string pnameb ( " " ) ; string pnamee ( " " ) ; string pfx ; string sfx ; if ( idx >= 0 ) { pfx = string ( " " ) + Gdec ( idx ) + string ( " " ) ; pnameb = pfx + pnameb ; } int nd = 0 ; string pname = pnameb + Gdec ( nd ) + pnamee ; ParameterSet :: const_iterator item ; item = pset . seek ( pname ) ; while ( item != pset . end ( ) && nd < 500 ) { nd ++ ; pname = pnameb + Gdec ( nd ) + pnamee ; item = pset . seek ( pname ) ; } return nd ; }
Functions To Set Quadrupolar Interactions From Single Index Parameters
Functions To Set Quadrupolar Interactions From Single Index Parameters
// Input		IQV	: Quadrupolar interaction vector (this) //                      pset	: A parameter set //			idx     : Parameter prefix index // Output               nd	: The number of Quadrupolar interactions //                                referenced by single indices in pset // Note				: This function looks for G(#) where //				  # = { 0, 1, ...., nd-1 }. // Parameter base name // Parameter ending // Parameter name prefix // Parameter name suffix // Set prefix if desired  // Number of Gs // Parameter name this G // A pix into parameter list // Pix in pset for parameter // See how many are in pset //	Increment G count // 	Adjust name next G // 	Pix pset for parameter