some changes reg index org
This commit is contained in:
parent
d3dbdbb865
commit
50985caf62
2 changed files with 16 additions and 8 deletions
|
@ -66,11 +66,11 @@ namespace MultiArrayTools
|
|||
void IndefinitIndexBase::freeLinked()
|
||||
{
|
||||
if(mLinked != nullptr){
|
||||
mLinked->freeLinked();
|
||||
//mLinked->freeLinked();
|
||||
mLinked = nullptr;
|
||||
}
|
||||
if(mSoftLinked != nullptr){
|
||||
mSoftLinked->freeLinked();
|
||||
//mSoftLinked->freeLinked();
|
||||
mSoftLinked = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -104,11 +104,12 @@ namespace MultiArrayTools
|
|||
return true;
|
||||
}
|
||||
|
||||
void IndefinitIndexBase::evalMajor()
|
||||
void IndefinitIndexBase::evalMajor(size_t stepSize, int num)
|
||||
{
|
||||
//assert(not virt());
|
||||
if(not master()){
|
||||
mMajor->eval();
|
||||
//mMajor->eval();
|
||||
mMajor->setPos(static_cast<int>( mMajor->pos() ) + num, this)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,6 +123,7 @@ namespace MultiArrayTools
|
|||
{
|
||||
//assert(not virt());
|
||||
mMajor = major;
|
||||
mMajorStepSize = mMajor->giveSubStepSize(this);
|
||||
}
|
||||
|
||||
/**************
|
||||
|
|
|
@ -46,18 +46,23 @@ namespace MultiArrayTools
|
|||
|
||||
//virtual IndefinitIndexBase* getLinked(const std::string& name) = 0;
|
||||
|
||||
// include sub-index update routine
|
||||
virtual void setPos(size_t pos);
|
||||
|
||||
// does NOT include sub-index update routine !!
|
||||
virtual void setPos(size_t pos, IndefinitIndexBase* subIndex) = 0;
|
||||
|
||||
virtual size_t max() const = 0;
|
||||
virtual size_t outOfRange() const;
|
||||
|
||||
virtual bool toNull() const;
|
||||
|
||||
virtual void eval() = 0;
|
||||
virtual void evalMajor();
|
||||
virtual void evalMajor(size_t stepSize, int num);
|
||||
virtual bool master();
|
||||
|
||||
virtual void subOrd(IndefinitIndexBase* major);
|
||||
virtual size_t giveSubStepSize(IndefinitIndexBase* subIndex) = 0;
|
||||
|
||||
//virtual bool virt() const { return true; }
|
||||
|
||||
|
@ -65,6 +70,7 @@ namespace MultiArrayTools
|
|||
|
||||
std::string mName;
|
||||
size_t mPos;
|
||||
size_t mMajorStep;
|
||||
|
||||
IndefinitIndexBase* mLinked = nullptr;
|
||||
IndefinitIndexBase* mMajor = nullptr;
|
||||
|
|
Loading…
Reference in a new issue