<commit_before>/*! \file revolution.h
 *  \brief The library's header file
 */
#ifndef REVOLUTION_H_INCLUDED
#define REVOLUTION_H_INCLUDED

/* From API C++ */
#if defined _WIN32 || defined __CYGWIN__
	#ifdef revolution_EXPORTS // define this when generating DLL
		#ifdef __GNUC__
			#define DLL_PUBLIC __attribute__((dllexport))
		#else
			#define DLL_PUBLIC __declspec(dllexport)
		#endif 
	#else
		#ifdef __GNUC__
			#define DLL_PUBLIC __attribute__((dllimport))
		#else
			#define DLL_PUBLIC __declspec(dllimport)
		#endif
	#endif
	#define DLL_HIDDEN 
#else
	#if __GNUC__ >= 4
		#define DLL_PUBLIC __attribute__ ((visibility("default"))) 
		#define DLL_HIDDEN __attribute__ ((visibility("hidden")))
	#else
		#define DLL_PUBLIC 
		#define DLL_HIDDEN
	#endif
#endif

#define RV_API_MAJOR	0
#define RV_API_MINOR	0
#define RV_API_PATCH	0

#ifdef __cplusplus
extern "C" {
#endif
		
DLL_PUBLIC int RVGetMajorVersion(void);
DLL_PUBLIC int RVGetMinorVersion(void);
DLL_PUBLIC int RVGetPatchVersion(void);

struct RVBasicEvolutionStrategy;
typedef struct RVBasicEvolutionStrategy RVBasicEvolutionStrategy;

/*! \var RVEvolutionStrategy
 *  \brief The library's main object type.
 */
/*typedef struct RVEvolutionStrategy RVEvolutionStrategy;*/

struct RVObjectiveFunction;

/*! \var RVObjectiveFunction
 *  \brief The object that defines an optimization problem.
 */
typedef struct RVObjectiveFunction RVObjectiveFunction;

/*! \var RVObjectiveEvalFun
 *  \brief A pointer to a function that evaluates a design vector.
 */
typedef int (*RVObjectiveEvalFun)(const double *designVector, double *objectivesEvaluation);

/*! \fn RVObjectiveFunction* RVObjectiveFunctionCreate(int dim, int objectives, RVObjectiveEvalFun fun);
 *  \brief Creates an object that defines an optimization problem.
 */
DLL_PUBLIC RVObjectiveFunction* RVObjectiveFunctionCreate(int dim, int objectives, RVObjectiveEvalFun fun);

/*! \fn void RVObjectiveFunctionDestroy(RVObjectiveFunction *object);
 *  \brief Destroys an RVObjectiveFunction object.
 */
DLL_PUBLIC void RVObjectiveFunctionDestroy(RVObjectiveFunction *object);

/*!
 *
 */
typedef struct RVBasicEvolutionStrategy RVBasicEvolutionStrategy;

/*!
 *
 */
typedef enum RVSelectionMode
{
	kRVSelectionModeInvalid,
	kRVSelectionModePlus,
	kRVSelectionModeComma
} RVSelectionMode;

/*! \fn RVBasicEvolutionStrategy* RVBasicEvolutionStrategyCreate(int mu, int rho, int lambda, RVObjectiveFunction *fun);
 *  \brief Creates an object that represents an evolution strategy.
 */
DLL_PUBLIC RVBasicEvolutionStrategy* RVBasicEvolutionStrategyCreate(int mu, int rho, int lambda, RVSelectionMode mode, RVObjectiveFunction *fun);

/*! \fn void RVBasicEvolutionStrategyDestroy(RVBasicEvolutionStrategy *es);
 *  \brief Destroys an RVBasicEvolutionStrategy objects and frees memory.
 */
DLL_PUBLIC void RVBasicEvolutionStrategyDestroy(RVBasicEvolutionStrategy *es);

#ifdef __cplusplus
}
#endif

#endif // REVOLUTION_H_INCLUDED
<commit_msg>compile fix for gcc<commit_after>/*! \file revolution.h
 *  \brief The library's header file
 */
#ifndef REVOLUTION_H_INCLUDED
#define REVOLUTION_H_INCLUDED

/* From API C++ */
#if defined _WIN32 || defined __CYGWIN__
	#ifdef revolution_EXPORTS // define this when generating DLL
		#ifdef __GNUC__
			#define DLL_PUBLIC __attribute__((dllexport))
		#else
			#define DLL_PUBLIC __declspec(dllexport)
		#endif 
	#else
		#ifdef __GNUC__
			#define DLL_PUBLIC __attribute__((dllimport))
		#else
			#define DLL_PUBLIC __declspec(dllimport)
		#endif
	#endif
	#define DLL_HIDDEN 
#else
	#if __GNUC__ >= 4
		#define DLL_PUBLIC __attribute__ ((visibility("default"))) 
		#define DLL_HIDDEN __attribute__ ((visibility("hidden")))
	#else
		#define DLL_PUBLIC 
		#define DLL_HIDDEN
	#endif
#endif

#define RV_API_MAJOR	0
#define RV_API_MINOR	0
#define RV_API_PATCH	0

#ifdef __cplusplus
extern "C" {
#endif
		
DLL_PUBLIC int RVGetMajorVersion(void);
DLL_PUBLIC int RVGetMinorVersion(void);
DLL_PUBLIC int RVGetPatchVersion(void);

/*! \var RVEvolutionStrategy
 *  \brief The library's main object type.
 */
/*typedef struct RVEvolutionStrategy RVEvolutionStrategy;*/

struct RVObjectiveFunction;

/*! \var RVObjectiveFunction
 *  \brief The object that defines an optimization problem.
 */
typedef struct RVObjectiveFunction RVObjectiveFunction;

/*! \var RVObjectiveEvalFun
 *  \brief A pointer to a function that evaluates a design vector.
 */
typedef int (*RVObjectiveEvalFun)(const double *designVector, double *objectivesEvaluation);

/*! \fn RVObjectiveFunction* RVObjectiveFunctionCreate(int dim, int objectives, RVObjectiveEvalFun fun);
 *  \brief Creates an object that defines an optimization problem.
 */
DLL_PUBLIC RVObjectiveFunction* RVObjectiveFunctionCreate(int dim, int objectives, RVObjectiveEvalFun fun);

/*! \fn void RVObjectiveFunctionDestroy(RVObjectiveFunction *object);
 *  \brief Destroys an RVObjectiveFunction object.
 */
DLL_PUBLIC void RVObjectiveFunctionDestroy(RVObjectiveFunction *object);

/*!
 *
 */
typedef struct RVBasicEvolutionStrategy RVBasicEvolutionStrategy;

/*!
 *
 */
typedef enum RVSelectionMode
{
	kRVSelectionModeInvalid,
	kRVSelectionModePlus,
	kRVSelectionModeComma
} RVSelectionMode;

/*! \fn RVBasicEvolutionStrategy* RVBasicEvolutionStrategyCreate(int mu, int rho, int lambda, RVObjectiveFunction *fun);
 *  \brief Creates an object that represents an evolution strategy.
 */
DLL_PUBLIC RVBasicEvolutionStrategy* RVBasicEvolutionStrategyCreate(int mu, int rho, int lambda, RVSelectionMode mode, RVObjectiveFunction *fun);

/*! \fn void RVBasicEvolutionStrategyDestroy(RVBasicEvolutionStrategy *es);
 *  \brief Destroys an RVBasicEvolutionStrategy objects and frees memory.
 */
DLL_PUBLIC void RVBasicEvolutionStrategyDestroy(RVBasicEvolutionStrategy *es);

#ifdef __cplusplus
}
#endif

#endif // REVOLUTION_H_INCLUDED

{'fraction_non_alphanumeric': 0.08465244322092223, 'fraction_numerical': 0.0020646937370956643, 'mean_word_length': 5.751451800232288, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5035959', 'n_tokens_mistral': 2023, 'n_tokens_neox': 1780, 'n_words': 493}