Illustrated C/C++ source sheets, symbol index, API relationship graph, compiler console and debug trace

LIVE AI / FLEXIBLE SENSING / FLIGHT CONTEXT

Sensoraia API

Live AI and sensing, connected to the flight.
See, listen, inspect and return supported results while airborne.

Loading...
Searching...
No Matches
cmaes_interface.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 OpenUAS
3 * SPDX-License-Identifier: Apache-2.0
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/* --------------------------------------------------------- */
19/* --- File: cmaes_interface.h - Author: Nikolaus Hansen --- */
20/* ---------------------- last modified: IV 2007 --- */
21/* --------------------------------- by: Nikolaus Hansen --- */
22/* --------------------------------------------------------- */
23/*
24 CMA-ES for non-linear function minimization.
25
26 Copyright (C) 1996, 2003, 2007 Nikolaus Hansen.
27 e-mail: hansen AT lri.fr
28
29 Documentation: see file docfunctions.txt
30
31 License: see file cmaes.c
32*/
33#include "cmaes.h"
34
35/* --------------------------------------------------------- */
36/* ------------------ Interface ---------------------------- */
37/* --------------------------------------------------------- */
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43/* --- initialization, constructors, destructors --- */
44double * cmaes_init(cmaes_t *, int dimension , double *xstart,
45 double *stddev, long seed, int lambda,
46 const char *input_parameter_filename);
47void cmaes_init_para(cmaes_t *, int dimension , double *xstart,
48 double *stddev, long seed, int lambda,
49 const char *input_parameter_filename);
50double * cmaes_init_final(cmaes_t *);
51void cmaes_resume_distribution(cmaes_t *evo_ptr, char *filename);
52void cmaes_exit(cmaes_t *);
53
54/* --- core functions --- */
55double * const * cmaes_SamplePopulation(cmaes_t *);
57 const double *rgFitnessValues);
58const char * cmaes_TestForTermination(cmaes_t *);
59
60/* --- additional functions --- */
61double * const * cmaes_ReSampleSingle( cmaes_t *t, int index);
62double const * cmaes_ReSampleSingle_old(cmaes_t *, double *rgx);
63double * cmaes_SampleSingleInto( cmaes_t *t, double *rgx);
64void cmaes_UpdateEigensystem(cmaes_t *, int flgforce);
65
66/* --- getter functions --- */
67double cmaes_Get(cmaes_t *, char const *keyword);
68const double * cmaes_GetPtr(cmaes_t *, char const *keyword); /* e.g. "xbestever" */
69double * cmaes_GetNew( cmaes_t *t, char const *keyword); /* user is responsible to free */
70double * cmaes_GetInto( cmaes_t *t, char const *keyword, double *mem); /* allocs if mem==NULL, user is responsible to free */
71
72/* --- online control and output --- */
73void cmaes_ReadSignals(cmaes_t *, char const *filename);
74void cmaes_WriteToFile(cmaes_t *, const char *szKeyWord,
75 const char *output_filename);
76char * cmaes_SayHello(cmaes_t *);
77/* --- misc --- */
78double * cmaes_NewDouble(int n); /* user is responsible to free */
79void cmaes_FATAL(char const *s1, char const *s2, char const *s3,
80 char const *s4);
81
82#ifdef __cplusplus
83} // end extern "C"
84#endif
85
double * cmaes_GetInto(cmaes_t *t, char const *keyword, double *mem)
Definition cmaes.c:1489
void cmaes_resume_distribution(cmaes_t *evo_ptr, char *filename)
Definition cmaes.c:438
double * cmaes_NewDouble(int n)
Definition cmaes.c:3033
double * cmaes_SampleSingleInto(cmaes_t *t, double *rgx)
Definition cmaes.c:725
char * cmaes_SayHello(cmaes_t *)
Definition cmaes.c:263
double * cmaes_UpdateDistribution(cmaes_t *, const double *rgFitnessValues)
Definition cmaes.c:810
double const * cmaes_ReSampleSingle_old(cmaes_t *, double *rgx)
Definition cmaes.c:676
void cmaes_exit(cmaes_t *)
Definition cmaes.c:565
const double * cmaes_GetPtr(cmaes_t *, char const *keyword)
Definition cmaes.c:1509
double * cmaes_init(cmaes_t *, int dimension, double *xstart, double *stddev, long seed, int lambda, const char *input_parameter_filename)
void cmaes_UpdateEigensystem(cmaes_t *, int flgforce)
Definition cmaes.c:1898
double * cmaes_init_final(cmaes_t *)
Definition cmaes.c:291
void cmaes_FATAL(char const *s1, char const *s2, char const *s3, char const *s4)
Definition cmaes.c:3087
void cmaes_init_para(cmaes_t *, int dimension, double *xstart, double *stddev, long seed, int lambda, const char *input_parameter_filename)
double * cmaes_GetNew(cmaes_t *t, char const *keyword)
Definition cmaes.c:1502
double *const * cmaes_SamplePopulation(cmaes_t *)
Definition cmaes.c:625
const char * cmaes_TestForTermination(cmaes_t *)
Definition cmaes.c:1548
void cmaes_WriteToFile(cmaes_t *, const char *szKeyWord, const char *output_filename)
Definition cmaes.c:1035
double cmaes_Get(cmaes_t *, char const *keyword)
Definition cmaes.c:1426
void cmaes_ReadSignals(cmaes_t *, char const *filename)
Definition cmaes.c:1684
double *const * cmaes_ReSampleSingle(cmaes_t *t, int index)
Definition cmaes.c:698