3 #ifndef TPZSloanRenumberingH 4 #define TPZSloanRenumberingH 28 #ifdef _OPTSET4History_ 36 #ifndef _OPTSET4History_ 48 #ifdef _OPTSET4History_ 58 #ifdef _OPTSET4History_ 59 if( (fHistory.insert(val)).second ==
true){
61 if( fHistory[val] == 0 ){
71 void remove(int64_t index){
72 fList[index] = fList[fSize-1];
78 for(int64_t i = 0; i <
fSize; i++){
89 int64_t
W1()
const{
return 1; }
90 int64_t
W2()
const{
return 2; }
113 TNo() : fprev(0),fnext(0),fIndex(-1),fSequenceNumber(-1),fPriority(-1),fStatus(
EInactive)
125 if( fActive.find(node->
fPriority) == fActive.end())
137 node->
fnext = second;
138 if(second) second->
fprev = node;
147 TNo* result = fActive.rbegin()->second;
148 int priority = fActive.rbegin()->first;
152 fActive.erase(priority);
156 fActive[priority] = next;
167 if(fActive.find(priority) == fActive.end())
DebugStop();
176 fActive.erase(priority);
182 fActive[priority] =
first;
189 if(prev) prev->
fnext = next;
190 if(next) next->
fprev = prev;
virtual ~TPZSloanRenumbering()
std::map< int, TNo * > fActive
int64_t FindHighestPriority(const SList &Q, const TPZVec< int64_t > &priority, int64_t &Qindex) const
virtual void Resequence2(TPZVec< int64_t > &permGather, TPZVec< int64_t > &permScatter)
Contains the TPZRenumbering class which defines the behavior to implementing node sequence numbering ...
REAL val(STATE &number)
Returns value of the variable.
TPZVec< int64_t > fHistory
TNo * PopHighestPriorityNode()
bool FindAndRemove(int64_t val)
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
This abstract class which defines the behavior which derived classes need to implement for implement...
#define DebugStop()
Returns a message to user put a breakpoint in.
virtual void clear()
Empty the vector, make its size zero.
Free store vector implementation.
void TransferPriority(TNo *no, int newpriority)
void InsertNode(TNo *node)
virtual void Resequence(TPZVec< int64_t > &permGather, TPZVec< int64_t > &permScatter)
bool push_back(int64_t val)
void Fill(const T ©, const int64_t from=0, const int64_t numelem=-1)
Will fill the elements of the vector with a copy object.