*** empty log message ***

This commit is contained in:
jiri 2007-06-26 09:57:15 +00:00
parent 3056732b52
commit 43cc687518
3 changed files with 30 additions and 8 deletions

View File

@ -119,6 +119,18 @@ x+= (x>>8);
x+= (x>>16);
return x&0x3f;
}
#else
static unsigned long word_popul(unsigned long x)
{
unsigned long s=0;
for(int i=0; i<64; ++i)
{
if(x&1) ++s;
x>>=1;
}
return s;
}
#endif

View File

@ -347,7 +347,7 @@ public:
typedef class piterator {
private:
fourindex_ext *base;
matel4stored<I,T> my;
matel4<I,T> my;
int permindex;
typename fourindex_ext::iterator it;
@ -371,8 +371,8 @@ public:
bool operator!=(const piterator &rhs) const {return base!=rhs.base;} //should only be used for comparison with end()
piterator &operator++() {if(++permindex>=fourindex_permnumbers[base->symmetry]) {permindex=0; ++it;} if(it.notNULL()) setup(); else base=NULL; return *this;}
piterator operator++(int) {laerror("postincrement not possible");}
const matel4stored<I,T> * operator->() const {return &my;}
const matel4stored<I,T> & operator*() const {return my;}
const matel4<I,T> * operator->() const {return &my;}
const matel4<I,T> & operator*() const {return my;}
bool end(void) {return !base;}
bool notend(void) {return base;}
};

18
t.cc
View File

@ -669,7 +669,7 @@ cout <<"e=exp(c)\n"<<e;
cout<<"error2 = "<<(e-b).norm()<<endl;
}
if(1)
if(0)
{
int n;
double f;
@ -1103,11 +1103,12 @@ double *p = (double *)A;
cout <<A;
}
if(0)
#if 0 //@@@make a more realistic test
{
int i;
DIIS<NRVec<double> > diis(5,1);
int dim=8;
DIIS<NRVec<double> > diis(5);
int dim;
cin>>dim;
NRVec<double> solution(dim), deviation(dim);
for(i=0; i<dim; ++i) solution[i]=i&1 ? i/2.:-i-3.;
for(i=0; i<dim; ++i) deviation[i]= (i&2 ? 1:-1) * random()/(1.+RAND_MAX);
@ -1124,6 +1125,7 @@ for(int iter=1; iter<100 && norm>1e-8 ; ++iter)
deviation=trial-solution;
}
}
#endif
if(0)
{
@ -1141,8 +1143,16 @@ NRSMat<double> a;
NRMat<double> b;
cin >>a>>b;
cout <<a*b;
}
if(1)
{
NRMat<double> a,b;
cin >>a >>b;
cout <<a.oplus(b);
cout <<a.otimes(b);
}
}