1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package developed jointly
5 // for the BaBar and CLEO collaborations. If you use all or part
6 // of it, please give an appropriate acknowledgement.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 2002 Caltech
13 // Description: Class to manipulate the amplitudes in the decays.
15 // Modification history:
17 // RYD Nov 22, 2002 Module created
19 //------------------------------------------------------------------------
21 #include "EvtGenBase/EvtPatches.hh"
22 #include "EvtGenBase/EvtAmpIndex.hh"
27 EvtAmpIndex::EvtAmpIndex(std::vector<int> ind):
35 for(i=0;i<_size;i++) {
41 _nstate[i]=_nstate[i-1]*_ind[i];
47 void EvtAmpIndex::reset(){
49 for(i=0;i<_size;i++) {
54 bool EvtAmpIndex::next(){
56 for(i=0;i<_size;i++) {
58 if (_state[i]<_ind[i]){
68 int EvtAmpIndex::index(){
73 for(i=0;i<_size;i++) {
74 ind+=_state[i]*_nstate[i];