#### File: MLS_emxAPI.c
        1   /*
        2    * File: MLS_emxAPI.c
        3    *
        4    * MATLAB Coder version            : 3.4
        5    * C/C++ source code generated on  : 27-Feb-2019 07:49:44
        6    */
        7
        8   /* Include Files */
        9   #include "rt_nonfinite.h"
       10   #include "MLS.h"
       11   #include "MLS_emxAPI.h"
       12   #include "MLS_emxutil.h"
       13
       14   /* Function Definitions */
       15
       16   /*
       17    * Arguments    : int numDimensions
       18    *                int *size
       19    * Return Type  : emxArray_char_T *
       20    */
       21   emxArray_char_T *emxCreateND_char_T(int numDimensions, int *size)
       22   {
       23     emxArray_char_T *emx;
       24     int numEl;
       25     int i;
       26     emxInit_char_T(&emx, numDimensions);
       27     numEl = 1;
       28     for (i = 0; i < numDimensions; i++) {
       29       numEl *= size[i];
       30       emx->size[i] = size[i];
       31     }
       32
       33     emx->data = (char *)calloc((unsigned int)numEl, sizeof(char));
       34     emx->numDimensions = numDimensions;
       35     emx->allocatedSize = numEl;
       36     return emx;
       37   }
       38
       39   /*
       40    * Arguments    : int numDimensions
       41    *                int *size
       42    * Return Type  : emxArray_real_T *
       43    */
       44   emxArray_real_T *emxCreateND_real_T(int numDimensions, int *size)
       45   {
       46     emxArray_real_T *emx;
       47     int numEl;
       48     int i;
       49     emxInit_real_T1(&emx, numDimensions);
       50     numEl = 1;
       51     for (i = 0; i < numDimensions; i++) {
       52       numEl *= size[i];
       53       emx->size[i] = size[i];
       54     }
       55
       56     emx->data = (double *)calloc((unsigned int)numEl, sizeof(double));
       57     emx->numDimensions = numDimensions;
       58     emx->allocatedSize = numEl;
       59     return emx;
       60   }
       61
       62   /*
       63    * Arguments    : char *data
       64    *                int numDimensions
       65    *                int *size
       66    * Return Type  : emxArray_char_T *
       67    */
       68   emxArray_char_T *emxCreateWrapperND_char_T(char *data, int numDimensions, int
       69     *size)
       70   {
       71     emxArray_char_T *emx;
       72     int numEl;
       73     int i;
       74     emxInit_char_T(&emx, numDimensions);
       75     numEl = 1;
       76     for (i = 0; i < numDimensions; i++) {
       77       numEl *= size[i];
       78       emx->size[i] = size[i];
       79     }
       80
       81     emx->data = data;
       82     emx->numDimensions = numDimensions;
       83     emx->allocatedSize = numEl;
       84     emx->canFreeData = false;
       85     return emx;
       86   }
       87
       88   /*
       89    * Arguments    : double *data
       90    *                int numDimensions
       91    *                int *size
       92    * Return Type  : emxArray_real_T *
       93    */
       94   emxArray_real_T *emxCreateWrapperND_real_T(double *data, int numDimensions, int *
       95     size)
       96   {
       97     emxArray_real_T *emx;
       98     int numEl;
       99     int i;
      100     emxInit_real_T1(&emx, numDimensions);
      101     numEl = 1;
      102     for (i = 0; i < numDimensions; i++) {
      103       numEl *= size[i];
      104       emx->size[i] = size[i];
      105     }
      106
      107     emx->data = data;
      108     emx->numDimensions = numDimensions;
      109     emx->allocatedSize = numEl;
      110     emx->canFreeData = false;
      111     return emx;
      112   }
      113
      114   /*
      115    * Arguments    : char *data
      116    *                int rows
      117    *                int cols
      118    * Return Type  : emxArray_char_T *
      119    */
      120   emxArray_char_T *emxCreateWrapper_char_T(char *data, int rows, int cols)
      121   {
      122     emxArray_char_T *emx;
      123     int size[2];
      124     int numEl;
      125     int i;
      126     size[0] = rows;
      127     size[1] = cols;
      128     emxInit_char_T(&emx, 2);
      129     numEl = 1;
      130     for (i = 0; i < 2; i++) {
      131       numEl *= size[i];
      132       emx->size[i] = size[i];
      133     }
      134
      135     emx->data = data;
      136     emx->numDimensions = 2;
      137     emx->allocatedSize = numEl;
      138     emx->canFreeData = false;
      139     return emx;
      140   }
      141
      142   /*
      143    * Arguments    : double *data
      144    *                int rows
      145    *                int cols
      146    * Return Type  : emxArray_real_T *
      147    */
      148   emxArray_real_T *emxCreateWrapper_real_T(double *data, int rows, int cols)
      149   {
      150     emxArray_real_T *emx;
      151     int size[2];
      152     int numEl;
      153     int i;
      154     size[0] = rows;
      155     size[1] = cols;
      156     emxInit_real_T1(&emx, 2);
      157     numEl = 1;
      158     for (i = 0; i < 2; i++) {
      159       numEl *= size[i];
      160       emx->size[i] = size[i];
      161     }
      162
      163     emx->data = data;
      164     emx->numDimensions = 2;
      165     emx->allocatedSize = numEl;
      166     emx->canFreeData = false;
      167     return emx;
      168   }
      169
      170   /*
      171    * Arguments    : int rows
      172    *                int cols
      173    * Return Type  : emxArray_char_T *
      174    */
      175   emxArray_char_T *emxCreate_char_T(int rows, int cols)
      176   {
      177     emxArray_char_T *emx;
      178     int size[2];
      179     int numEl;
      180     int i;
      181     size[0] = rows;
      182     size[1] = cols;
      183     emxInit_char_T(&emx, 2);
      184     numEl = 1;
      185     for (i = 0; i < 2; i++) {
      186       numEl *= size[i];
      187       emx->size[i] = size[i];
      188     }
      189
      190     emx->data = (char *)calloc((unsigned int)numEl, sizeof(char));
      191     emx->numDimensions = 2;
      192     emx->allocatedSize = numEl;
      193     return emx;
      194   }
      195
      196   /*
      197    * Arguments    : int rows
      198    *                int cols
      199    * Return Type  : emxArray_real_T *
      200    */
      201   emxArray_real_T *emxCreate_real_T(int rows, int cols)
      202   {
      203     emxArray_real_T *emx;
      204     int size[2];
      205     int numEl;
      206     int i;
      207     size[0] = rows;
      208     size[1] = cols;
      209     emxInit_real_T1(&emx, 2);
      210     numEl = 1;
      211     for (i = 0; i < 2; i++) {
      212       numEl *= size[i];
      213       emx->size[i] = size[i];
      214     }
      215
      216     emx->data = (double *)calloc((unsigned int)numEl, sizeof(double));
      217     emx->numDimensions = 2;
      218     emx->allocatedSize = numEl;
      219     return emx;
      220   }
      221
      222   /*
      223    * Arguments    : emxArray_char_T *emxArray
      224    * Return Type  : void
      225    */
      226   void emxDestroyArray_char_T(emxArray_char_T *emxArray)
      227   {
      228     emxFree_char_T(&emxArray);
      229   }
      230
      231   /*
      232    * Arguments    : emxArray_real_T *emxArray
      233    * Return Type  : void
      234    */
      235   void emxDestroyArray_real_T(emxArray_real_T *emxArray)
      236   {
      237     emxFree_real_T(&emxArray);
      238   }
      239
      240   /*
      241    * Arguments    : struct0_T emxArray
      242    * Return Type  : void
      243    */
      244   void emxDestroy_struct0_T(struct0_T emxArray)
      245   {
      246     emxFreeStruct_struct0_T(&emxArray);
      247   }
      248
      249   /*
      250    * Arguments    : emxArray_char_T **pEmxArray
      251    *                int numDimensions
      252    * Return Type  : void
      253    */
      254   void emxInitArray_char_T(emxArray_char_T **pEmxArray, int numDimensions)
      255   {
      256     emxInit_char_T(pEmxArray, numDimensions);
      257   }
      258
      259   /*
      260    * Arguments    : emxArray_real_T **pEmxArray
      261    *                int numDimensions
      262    * Return Type  : void
      263    */
      264   void emxInitArray_real_T(emxArray_real_T **pEmxArray, int numDimensions)
      265   {
      266     emxInit_real_T1(pEmxArray, numDimensions);
      267   }
      268
      269   /*
      270    * Arguments    : struct0_T *pStruct
      271    * Return Type  : void
      272    */
      273   void emxInit_struct0_T(struct0_T *pStruct)
      274   {
      275     emxInitStruct_struct0_T(pStruct);
      276   }
      277
      278   /*
      279    * File trailer for MLS_emxAPI.c
      280    *
      281    * [EOF]
      282    */
      283