// Copyright (C) 2006 SAMTECH // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License. // // This library is distributed in the hope that it will be useful // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // File: NMTDS_PassKey.cxx // Created: // Author: Peter KURNEV // #include #include #include #include #ifdef WNT #pragma warning( disable : 4101) #endif static void SortShell(const int n, int* a); static Standard_Integer NormalizedId(const Standard_Integer aId, const Standard_Integer aDiv); //======================================================================= //function : //purpose : //======================================================================= NMTDS_PassKey::NMTDS_PassKey() { Clear(); } //======================================================================= //function :Assign //purpose : //======================================================================= NMTDS_PassKey& NMTDS_PassKey::Assign(const NMTDS_PassKey& anOther) { myNbIds=anOther.myNbIds; myNbMax=anOther.myNbMax; mySum=anOther.mySum; memcpy(myIds, anOther.myIds, sizeof(myIds)); return *this; } //======================================================================= //function :Clear //purpose : //======================================================================= void NMTDS_PassKey::Clear() { Standard_Integer i; // myNbIds=0; myNbMax=2; mySum=0; for (i=0; iaTresh) { aIdRet=aId%aTresh; } return aIdRet; } //======================================================================= // function: SortShell // purpose : //======================================================================= void SortShell(const int n, int* a) { int x, nd, i, j, l, d=1; // while(d<=n) { d*=2; } // while (d) { d=(d-1)/2; // nd=n-d; for (i=0; i -1) goto m30; }//if (a[l] < a[j]){ }//for (i=0; i