From 43cc687518bc30c65e0292b69ab0d7f7b59f350c Mon Sep 17 00:00:00 2001 From: jiri Date: Tue, 26 Jun 2007 09:57:15 +0000 Subject: [PATCH] *** empty log message *** --- bitvector.cc | 12 ++++++++++++ fourindex.h | 6 +++--- t.cc | 20 +++++++++++++++----- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/bitvector.cc b/bitvector.cc index aac2cfd..e96f910 100644 --- a/bitvector.cc +++ b/bitvector.cc @@ -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 diff --git a/fourindex.h b/fourindex.h index 3a3ad61..da3c42b 100644 --- a/fourindex.h +++ b/fourindex.h @@ -347,7 +347,7 @@ public: typedef class piterator { private: fourindex_ext *base; - matel4stored my; + matel4 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 * operator->() const {return &my;} - const matel4stored & operator*() const {return my;} + const matel4 * operator->() const {return &my;} + const matel4 & operator*() const {return my;} bool end(void) {return !base;} bool notend(void) {return base;} }; diff --git a/t.cc b/t.cc index b97c525..dfc509e 100644 --- a/t.cc +++ b/t.cc @@ -669,7 +669,7 @@ cout <<"e=exp(c)\n"< > diis(5,1); -int dim=8; +DIIS > diis(5); +int dim; +cin>>dim; NRVec solution(dim), deviation(dim); for(i=0; i1e-8 ; ++iter) deviation=trial-solution; } } +#endif if(0) { @@ -1141,8 +1143,16 @@ NRSMat a; NRMat b; cin >>a>>b; cout < a,b; +cin >>a >>b; +cout <