<commit_before>/*******************************************************************************
**
**  MIToolbox.h
**  Provides the header files and #defines to ensure compatibility with MATLAB
**  and C/C++. By default it compiles to MATLAB, if COMPILE_C is defined it
**  links to the C memory allocation functions.
**
**  Author: <NAME>
**  Created: 17/2/2010
**  Modified: 24/06/2011 - added log base #define
**
**  Copyright 2010/2011 <NAME>, The University Of Manchester
**  www.cs.manchester.ac.uk
**
**  This file is part of MIToolbox, licensed under the 3-clause BSD license.
*******************************************************************************/

#ifndef __MIToolbox_H
#define __MIToolbox_H

#include <math.h>
#include <string.h>

#define BASE_TWO 2.0
#define BASE_E M_E

#define LOG_BASE BASE_TWO

typedef unsigned int uint;

#ifdef COMPILE_C
  #define C_IMPLEMENTATION
  #include <stdio.h>
  #include <stdlib.h>
  #define CALLOC_FUNC calloc
  #define FREE_FUNC free
#else
  #define MEX_IMPLEMENTATION
  #include "mex.h"
  #define CALLOC_FUNC mxCalloc
  #define FREE_FUNC mxFree
  #define printf mexPrintf /*for Octave-3.2*/
#endif

#endif
<commit_msg>Adding COMPILE_R flag to MIToolbox.h<commit_after>/*******************************************************************************
**
**  MIToolbox.h
**  Provides the header files and #defines to ensure compatibility with MATLAB
**  and C/C++. By default it compiles to MATLAB, if COMPILE_C is defined it
**  links to the C memory allocation functions.
**
**  Author: <NAME>
**  Created: 17/2/2010
**  Modified: 24/06/2011 - added log base #define
**
**  Copyright 2010/2011 <NAME>, The University Of Manchester
**  www.cs.manchester.ac.uk
**
**  This file is part of MIToolbox, licensed under the 3-clause BSD license.
*******************************************************************************/

#ifndef __MIToolbox_H
#define __MIToolbox_H

#include <math.h>
#include <string.h>

#define BASE_TWO 2.0
#define BASE_E M_E

#define LOG_BASE BASE_TWO

typedef unsigned int uint;

#ifdef COMPILE_C
  #define C_IMPLEMENTATION
  #include <stdio.h>
  #include <stdlib.h>
  #define CALLOC_FUNC(a,b) calloc(a,b)
  #define FREE_FUNC(a) free(a)
#elif defined(COMPILE_R)
  #define R_IMPLEMENTATION
  #include "R.h"
  #define CALLOC_FUNC(a,b) Calloc((a)*(b),char)
  #define FREE_FUNC(a) Free((a))
  #define printf Rprintf
#else
  #define MEX_IMPLEMENTATION
  #include "mex.h"
  #define CALLOC_FUNC(a,b) mxCalloc(a,b)
  #define FREE_FUNC(a) mxFree(a)
  #define printf mexPrintf /*for Octave-3.2*/
#endif

#endif

{'fraction_non_alphanumeric': 0.2247670807453416, 'fraction_numerical': 0.021739130434782608, 'mean_word_length': 5.049295774647887, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2108649', 'n_tokens_mistral': 919, 'n_tokens_neox': 863, 'n_words': 251}