Example #1
0
        public Limit(LimitType lt, Equation equa)
        {
            int type = 0;

            switch (lt)
            {
            case LimitType.Less: type = 1; break;

            case LimitType.More: type = 2; break;
            }
            limit = LP_DLL.Limit(type, equa.IntPtr());
        }
Example #2
0
        public Task(TaskType taskType, Limit[] limits, Equation equation)
        {
            int tt = 0;

            if (taskType == TaskType.Min)
            {
                tt = 1;
            }

            IntPtr[] ptrs = new IntPtr[limits.Count()];
            for (int i = 0; i < limits.Count(); i++)
            {
                ptrs[i] = limits[i].IntPtr();
            }
            unsafe
            {
                fixed(IntPtr *pArray = ptrs)
                {
                    IntPtr limitsPtr = new IntPtr((void *)pArray);

                    task = LP_DLL.Task(tt, limits.Count(), limitsPtr, equation.IntPtr());
                }
            }
        }
Example #3
0
        public Task(TaskType taskType, Limit[] limits, Equation equation)
        {
            int tt = 0;
              if(taskType == TaskType.Min) tt = 1;

              IntPtr[] ptrs = new IntPtr[limits.Count()];
              for (int i = 0; i < limits.Count(); i++) ptrs[i] = limits[i].IntPtr();
              unsafe {
            fixed (IntPtr* pArray = ptrs) {
              IntPtr limitsPtr = new IntPtr((void*)pArray);
              task = LP_DLL.Task(tt, limits.Count(), limitsPtr, equation.IntPtr());
            }
              }
        }
Example #4
0
 public Limit(LimitType lt, Equation equa)
 {
     int type = 0;
       switch(lt){
     case LimitType.Less: type = 1; break;
     case LimitType.More: type = 2; break;
       }
       limit = LP_DLL.Limit(type, equa.IntPtr());
 }