internal static extern void lmmin( int n_par, IntPtr par, int m_dat, IntPtr data, LMDelegate evaluate, ref LMControlStruct control, ref LMStatusStruct status, AllocatorDelegate arrayAllocator, DeallocatorDelegate arrayDeallocator);
/// <summary> /// Initializes a new instance of the <see cref="OwnedStdString"/> class. /// Construct a wrapper around std::string. /// </summary> /// <remarks> /// Violating any of these might cause an undefined hehaviour. /// 1. This function takes the ownership of the address. /// 2. A memory pointed by address argument is assumed to be allocated by Marshal.AllocHGlobal thus will try to call Marshal.FreeHGlobal on the address. /// 3. std::string object pointed by address must be initialized before calling this function. /// </remarks> /// <param name="address">The address of the owned std string.</param> /// <param name="dealloc">A deallocator function.</param> internal OwnedStdString(IntPtr address, DeallocatorDelegate dealloc) { this.Address = address; this.dealloc = dealloc; }