alib
Universal C Library Collection for Machine Learning & Artificial Intelligence
Loading...
Searching...
No Matches
calc.h
Go to the documentation of this file.
1
10#ifndef CALC_H
11#define CALC_H
12
13#include <math.h>
14
22typedef double (*calc_function_fn)(double);
23
36
52double calc_function_negation(double x);
53
63
70
86double calc_function_square(double x);
87
97
104
124double calc_function_relu(double x);
125
148
155
176double calc_function_tanh(double x);
177
198
205
227double calc_function_sigmoid(double x);
228
249
256
269double calc_approx_derivative(double (*f)(double), double x, double h);
270
286double calc_approx_finite_integral(double (*f)(double), double a, double b,
287 int n);
288
289#endif
double calc_function_sigmoid(double x)
Calculate the sigmoid function.
const calc_function CALC_FUNCTION_SIGMOID
Predefined Sigmoid function.
const calc_function CALC_FUNCTION_NEGATION
Predefined negation function.
double calc_function_square_derivative(double x)
Calculate the derivative of the square function.
const calc_function CALC_FUNCTION_TANH
Predefined Tanh function.
double calc_function_negation_derivative(double x)
Calculate the derivative of the negation function.
double calc_approx_derivative(double(*f)(double), double x, double h)
Calculate the numerical derivative of a function at a point.
double calc_function_relu_derivative(double x)
Calculate the derivative of the ReLU function.
double calc_function_square(double x)
Calculate the square of a given double.
const calc_function CALC_FUNCTION_RELU
Predefined ReLU function.
double calc_function_sigmoid_derivative(double x)
Calculate the derivative of the sigmoid function.
const calc_function CALC_FUNCTION_SQUARE
Predefined square function.
double calc_approx_finite_integral(double(*f)(double), double a, double b, int n)
Calculate the numerical integral of a function over an interval.
double calc_function_relu(double x)
Calculate the ReLU (Rectified Linear Unit) function.
double calc_function_tanh_derivative(double x)
Calculate the derivative of the Tanh function.
struct calc_function calc_function
Structure representing an function and its derivative.
double calc_function_negation(double x)
Negate the value of a given double.
double calc_function_tanh(double x)
Calculate the Tanh function.
double(* calc_function_fn)(double)
A function pointer type for functions.
Definition calc.h:22
Structure representing an function and its derivative.
Definition calc.h:30
char name[16]
Definition calc.h:31
calc_function_fn activation
Definition calc.h:32
calc_function_fn derivative
Definition calc.h:34