コード例 #1
0
 void Set (const INDEX & ahash, const T & acont)
 {
   int pos;
   PositionCreate (ahash, pos);
   hash.Elem(pos) = ahash;
   cont.Elem(pos) = acont;
 }
コード例 #2
0
  // returns 1, if new postion is created
  int PositionCreate (const INDEX_2 & ind, int & apos)
  {
    int i = HashValue (ind);
    if (hash.Get(i) == ind) 
      {
	apos = i;
	return 0;
      }
    if (hash.Get(i).I1() == invalid)
      {
	hash.Elem(i) = ind; 
	apos = i;
	return 1;
      }
    return PositionCreate2 (ind, apos);    
  }
コード例 #3
0
 inline void SetData (int pos, const T & acont)
 {
   cont.Elem(pos) = acont;
 }
コード例 #4
0
 inline void SetData (int pos, const INDEX & ahash, const T & acont)
 {
   hash.Elem(pos) = ahash;
   cont.Elem(pos) = acont;
 }