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()); }
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()); } } }
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()); } } }
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()); }