Exemple #1
0
		// Helpers	
		public static int Nearest( int[] i, sStkNPS[] a, double v, int l, int h )
		{
			int m = 0;
			while( l < h )
			{
				m = ( l + h ) >> 1;
				if( a[i[m]].value >= v ) l = m + 1; else h = m;
			}
			return ( h );
		}
Exemple #2
0
		public static int Allocate( btList<int> ifree,
			btList<sStkNPS> stock,
			sStkNPS value )
		{
			//int	i;
			//if(ifree.Count>0)
			//{
			//	i = ifree[ifree.Count - 1]; 
			//	ifree.pop_back(); 
			//	stock[i] = value; 
			//}
			//else
			//{ 
			//	i=stock.Count;
			//	stock.push_back(value); 
			//}
			//return(i); 
			return 0;
		}
Exemple #3
0
 public void set(sStkNPS o)
 {
     node  = o.node;
     mask  = o.mask;
     value = o.value;
 }
Exemple #4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(sStkNPS obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }