Algorithms_in_C  1.0.0
Set of algorithms implemented in C.
hash.h
1 /*
2  author: Christian Bender
3  This file contains the public interface
4 
5  Overview about hash-functions:
6 
7  - sdbm
8  - djb2
9  - xor8 (8 bit)
10  - adler_32 (32 bits)
11 */
12 
13 #ifndef __HASH__H
14 #define __HASH__H
15 
16 /*
17  sdbm: implements the sdbm hash-algorithm
18  returns a whole number of type long long.
19 */
20 long long sdbm(char[]);
21 
22 /*
23  djb2: implements the djb2 hash-algorithm
24  returns a whole number of type long long.
25 */
26 long long djb2(char[]);
27 
28 /*
29  xor8: implements the xor8 hash-algorithm
30  returns a whole number of type char.
31  length: 8 bit
32 */
33 char xor8(char[]);
34 
35 /*
36  adler_32: implements the adler-32 hash-algorithm
37  returns a whole number of type int.
38  length: 32 bit
39  assumes: int has a length of 32 bits.
40 */
41 int adler_32(char[]);
42 
43 /*
44  crc32: implements the crc-32 checksum-algorithm
45  returns the crc-32 checksum
46 */
47 int crc32(char[]);
48 
49 #endif
data
Definition: prime_factoriziation.c:25
N
#define N
number of digits of the large number
Definition: sol1.c:109
spirograph
void spirograph(double *x, double *y, double l, double k, size_t N, double rot)
Generate spirograph curve into arrays x and y such that the i^th point in 2D is represented by (x[i],...
Definition: spirograph.c:57
test
void test(void)
Test function to save resulting points to a CSV file.
Definition: spirograph.c:74
main
int main(int argc, char **argv)
the main function take one argument of type char* example : .
Definition: c_atoi_str_to_integer.c:72
main
int main(int argc, char **argv)
Main function.
Definition: spirograph.c:271
test2
void test2(double eta)
test function to predict points in a 2D coordinate system above the line as +1 and others as -1.
Definition: adaline_learning.c:273