// dnafunc1.c (125, 1) // l_dnaaFlattenToDna(daa) as L_Dna // l_dnaaFlattenToDna(L_DNAA *) as L_DNA * /// <summary> /// (1) This 'flattens' the dnaa to a dna, by joining successively /// each dna in the dnaa.<para/> /// /// (2) It leaves the input dnaa unchanged. /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaFlattenToDna/*"/> /// <param name="daa">[in] - </param> /// <returns>dad, or NULL on error</returns> public static L_Dna l_dnaaFlattenToDna( L_Dnaa daa) { if (daa == null) {throw new ArgumentNullException ("daa cannot be Nothing");} IntPtr _Result = Natives.l_dnaaFlattenToDna(daa.Pointer); if (_Result == IntPtr.Zero) {return null;} return new L_Dna(_Result); }
// dnabasic.c (1194, 1) // l_dnaaTruncate(daa) as int // l_dnaaTruncate(L_DNAA *) as l_ok /// <summary> /// (1) This identifies the largest index containing a dna that /// has any numbers within it, destroys all dna beyond that /// index, and resets the count. /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaTruncate/*"/> /// <param name="daa">[in] - </param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaTruncate( L_Dnaa daa) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } int _Result = Natives.l_dnaaTruncate(daa.Pointer); return(_Result); }
// dnabasic.c (1351, 1) // l_dnaaGetDnaCount(daa, index) as int // l_dnaaGetDnaCount(L_DNAA *, l_int32) as l_int32 /// <summary> /// l_dnaaGetDnaCount() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaGetDnaCount/*"/> /// <param name="daa">[in] - </param> /// <param name="index">[in] - of l_dna in daa</param> /// <returns>count of numbers in the referenced l_dna, or 0 on error.</returns> public static int l_dnaaGetDnaCount( L_Dnaa daa, int index) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } int _Result = Natives.l_dnaaGetDnaCount(daa.Pointer, index); return(_Result); }
// dnabasic.c (1510, 1) // l_dnaaAddNumber(daa, index, val) as int // l_dnaaAddNumber(L_DNAA *, l_int32, l_float64) as l_ok /// <summary> /// (1) Adds to an existing l_dna only. /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaAddNumber/*"/> /// <param name="daa">[in] - </param> /// <param name="index">[in] - of l_dna within l_dnaa</param> /// <param name="val">[in] - number to be added stored as a double</param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaAddNumber( L_Dnaa daa, int index, double val) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } int _Result = Natives.l_dnaaAddNumber(daa.Pointer, index, val); return(_Result); }
// dnabasic.c (1470, 1) // l_dnaaGetValue(daa, i, j, pval) as int // l_dnaaGetValue(L_DNAA *, l_int32, l_int32, l_float64 *) as l_ok /// <summary> /// l_dnaaGetValue() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaGetValue/*"/> /// <param name="daa">[in] - </param> /// <param name="i">[in] - index of l_dna within l_dnaa</param> /// <param name="j">[in] - index into l_dna</param> /// <param name="pval">[out] - double value</param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaGetValue( L_Dnaa daa, int i, int j, out Double[] pval) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } int _Result = Natives.l_dnaaGetValue(daa.Pointer, i, j, out pval); return(_Result); }
public static L_Dna l_dnaaFlattenToDna(L_Dnaa daa) { if (null == daa) { throw new ArgumentNullException("da cannot be null"); } var pointer = Native.DllImports.l_dnaaFlattenToDna((HandleRef)daa); if (IntPtr.Zero == pointer) { return(null); } else { return(new L_Dna(pointer)); } }
// dnabasic.c (1644, 1) // l_dnaaWriteStream(fp, daa) as int // l_dnaaWriteStream(FILE *, L_DNAA *) as l_ok /// <summary> /// l_dnaaWriteStream() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaWriteStream/*"/> /// <param name="fp">[in] - file stream</param> /// <param name="daa">[in] - </param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaWriteStream( FILE fp, L_Dnaa daa) { if (fp == null) { throw new ArgumentNullException("fp cannot be Nothing"); } if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } int _Result = Natives.l_dnaaWriteStream(fp.Pointer, daa.Pointer); return(_Result); }
// dnabasic.c (1613, 1) // l_dnaaWrite(filename, daa) as int // l_dnaaWrite(const char *, L_DNAA *) as l_ok /// <summary> /// l_dnaaWrite() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaWrite/*"/> /// <param name="filename">[in] - </param> /// <param name="daa">[in] - </param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaWrite( String filename, L_Dnaa daa) { if (filename == null) { throw new ArgumentNullException("filename cannot be Nothing"); } if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } int _Result = Natives.l_dnaaWrite(filename, daa.Pointer); return(_Result); }
// dnabasic.c (1265, 1) // l_dnaaAddDna(daa, da, copyflag) as int // l_dnaaAddDna(L_DNAA *, L_DNA *, l_int32) as l_ok /// <summary> /// l_dnaaAddDna() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaAddDna/*"/> /// <param name="daa">[in] - </param> /// <param name="da">[in] - to be added</param> /// <param name="copyflag">[in] - L_INSERT, L_COPY, L_CLONE</param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaAddDna( L_Dnaa daa, L_Dna da, int copyflag) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } if (da == null) { throw new ArgumentNullException("da cannot be Nothing"); } int _Result = Natives.l_dnaaAddDna(daa.Pointer, da.Pointer, copyflag); return(_Result); }
// dnabasic.c (1228, 1) // l_dnaaDestroy(pdaa) as Object // l_dnaaDestroy(L_DNAA **) as void /// <summary> /// l_dnaaDestroy() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaDestroy/*"/> /// <param name="pdaa">[in,out] - to be nulled if it exists</param> public static void l_dnaaDestroy( ref L_Dnaa pdaa) { IntPtr pdaaPtr = IntPtr.Zero; if (pdaa != null) { pdaaPtr = pdaa.Pointer; } Natives.l_dnaaDestroy(ref pdaaPtr); if (pdaaPtr == IntPtr.Zero) { pdaa = null; } else { pdaa = new L_Dnaa(pdaaPtr); }; }
// dnabasic.c (1438, 1) // l_dnaaReplaceDna(daa, index, da) as int // l_dnaaReplaceDna(L_DNAA *, l_int32, L_DNA *) as l_ok /// <summary> /// (1) Any existing l_dna is destroyed, and the input one /// is inserted in its place.<para/> /// /// (2) If the index is invalid, return 1 (error) /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaReplaceDna/*"/> /// <param name="daa">[in] - </param> /// <param name="index">[in] - to the index-th l_dna</param> /// <param name="da">[in] - insert and replace any existing one</param> /// <returns>0 if OK, 1 on error</returns> public static int l_dnaaReplaceDna( L_Dnaa daa, int index, L_Dna da) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } if (da == null) { throw new ArgumentNullException("da cannot be Nothing"); } int _Result = Natives.l_dnaaReplaceDna(daa.Pointer, index, da.Pointer); return(_Result); }
// dnabasic.c (1402, 1) // l_dnaaGetDna(daa, index, accessflag) as L_Dna // l_dnaaGetDna(L_DNAA *, l_int32, l_int32) as L_DNA * /// <summary> /// l_dnaaGetDna() /// </summary> /// <remarks> /// </remarks> /// <include file="..\CHM_Help\IncludeComments.xml" path="Comments/l_dnaaGetDna/*"/> /// <param name="daa">[in] - </param> /// <param name="index">[in] - to the index-th l_dna</param> /// <param name="accessflag">[in] - L_COPY or L_CLONE</param> /// <returns>l_dna, or NULL on error</returns> public static L_Dna l_dnaaGetDna( L_Dnaa daa, int index, int accessflag) { if (daa == null) { throw new ArgumentNullException("daa cannot be Nothing"); } IntPtr _Result = Natives.l_dnaaGetDna(daa.Pointer, index, accessflag); if (_Result == IntPtr.Zero) { return(null); } return(new L_Dna(_Result)); }