Exemplo n.º 1
0
    public static emxArray_real_T emxCreate_real_T(SWIGTYPE_p_int32_T rows, SWIGTYPE_p_int32_T cols)
    {
        global::System.IntPtr cPtr = IsarMaincsPINVOKE.emxCreate_real_T(SWIGTYPE_p_int32_T.getCPtr(rows), SWIGTYPE_p_int32_T.getCPtr(cols));
        emxArray_real_T       ret  = (cPtr == global::System.IntPtr.Zero) ? null : new emxArray_real_T(cPtr, true);

        if (IsarMaincsPINVOKE.SWIGPendingException.Pending)
        {
            throw IsarMaincsPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Exemplo n.º 2
0
    public static emxArray_real_T emxCreateWrapperND_real_T(SWIGTYPE_p_real_T data, SWIGTYPE_p_int32_T numDimensions, SWIGTYPE_p_int32_T size)
    {
        global::System.IntPtr cPtr = IsarMaincsPINVOKE.emxCreateWrapperND_real_T(SWIGTYPE_p_real_T.getCPtr(data), SWIGTYPE_p_int32_T.getCPtr(numDimensions), SWIGTYPE_p_int32_T.getCPtr(size));
        emxArray_real_T       ret  = (cPtr == global::System.IntPtr.Zero) ? null : new emxArray_real_T(cPtr, true);

        if (IsarMaincsPINVOKE.SWIGPendingException.Pending)
        {
            throw IsarMaincsPINVOKE.SWIGPendingException.Retrieve();
        }
        return(ret);
    }
Exemplo n.º 3
0
    // Test Driver
    public static void Main(string[] args)
    {
        // Call initialize function to set up any necessary state
        System.Console.WriteLine("Calling initialize");
        timestwocs.timestwo_initialize();

        // 2-by-3 input
        int m = 2;
        int n = 3;

        using (intArray dims = new intArray(2))                                                   // Size vector
            using (doubleArray data = new doubleArray(6))                                         // Data
                using (emxArray_real_T x = timestwocs.emxCreateWrapper_real_T(data.cast(), m, n)) // Input
                    using (emxArray_real_T y = timestwocs.emxCreate_real_T(0, 0)) {               // Output
                        // 2-by-3 input
                        dims.setitem(0, m);
                        dims.setitem(1, n);

                        // Data
                        int numel = m * n;
                        for (int i = 0; i < numel; i++)
                        {
                            data.setitem(i, i);
                        }
                        System.Console.WriteLine("Initial data");
                        timestwoMain.printArray(data, numel);
                        // Call entry-point
                        timestwocs.timestwo(x, y);

                        // Gather returned data
                        doubleArray output      = doubleArray.frompointer(y.data);
                        int         outputND    = y.numDimensions;
                        intArray    outputSize  = intArray.frompointer(y.size);
                        int         outputNumel = 1;
                        for (int dim = 0; dim < outputND; dim++)
                        {
                            outputNumel *= outputSize.getitem(dim);
                        }
                        timestwoMain.printArray(output, outputNumel);

                        // Call terminate function to perform any necessary clean up
                        System.Console.WriteLine("Calling terminate");
                        timestwocs.timestwo_terminate();

                        // No need to clean up emxArray variables as destructors are
                        // automatically called and have the call to emxDestroy_real_T
                        // injected in them
                    }
    }
Exemplo n.º 4
0
 public static void emxDestroyArray_real_T(emxArray_real_T emxArray)
 {
     IsarMaincsPINVOKE.emxDestroyArray_real_T(emxArray_real_T.getCPtr(emxArray));
 }
Exemplo n.º 5
0
 public static void IsarMain(emxArray_real_T rkafile, emxArray_real_T XX, emxArray_real_T YY, SWIGTYPE_p_real_T Th1, SWIGTYPE_p_real_T Ph1, emxArray_real_T ISAR_VVdB, emxArray_real_T ISAR_VHdB, emxArray_real_T ISAR_HVdB, emxArray_real_T ISAR_HHdB)
 {
     IsarMaincsPINVOKE.IsarMain(emxArray_real_T.getCPtr(rkafile), emxArray_real_T.getCPtr(XX), emxArray_real_T.getCPtr(YY), SWIGTYPE_p_real_T.getCPtr(Th1), SWIGTYPE_p_real_T.getCPtr(Ph1), emxArray_real_T.getCPtr(ISAR_VVdB), emxArray_real_T.getCPtr(ISAR_VHdB), emxArray_real_T.getCPtr(ISAR_HVdB), emxArray_real_T.getCPtr(ISAR_HHdB));
 }
Exemplo n.º 6
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(emxArray_real_T obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }