~ubuntu-branches/debian/sid/octave-tisean/sid

« back to all changes in this revision

Viewing changes to src/routines_c/tsa.h

  • Committer: Package Import Robot
  • Author(s): Rafael Laboissiere
  • Date: 2017-08-14 12:53:47 UTC
  • Revision ID: package-import@ubuntu.com-20170814125347-ju5owr4dggr53a2n
Tags: upstream-0.2.3
ImportĀ upstreamĀ versionĀ 0.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   This file is part of TISEAN
 
3
 *
 
4
 *   Copyright (c) 1998-2007 Rainer Hegger, Holger Kantz, Thomas Schreiber
 
5
 *
 
6
 *   TISEAN is free software; you can redistribute it and/or modify
 
7
 *   it under the terms of the GNU General Public License as published by
 
8
 *   the Free Software Foundation; either version 2 of the License, or
 
9
 *   (at your option) any later version.
 
10
 *
 
11
 *   TISEAN is distributed in the hope that it will be useful,
 
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *   GNU General Public License for more details.
 
15
 *
 
16
 *   You should have received a copy of the GNU General Public License
 
17
 *   along with TISEAN; if not, write to the Free Software
 
18
 *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
/* Author: Rainer Hegger 
 
21
 * Modified: Piotr Held <pjheld@gmail.com> (2015). 
 
22
 */
 
23
 
 
24
#ifndef _TSA_ROUTINES_H
 
25
#define _TSA_ROUTINES_H
 
26
 
 
27
#include <octave/oct.h>
 
28
 
 
29
#ifndef _TISEAN_CEC_H
 
30
#include "tisean_cec.h"
 
31
#endif
 
32
 
 
33
#ifndef TISEAN_RAND_H
 
34
#include "TISEAN_rand.h"
 
35
#endif
 
36
 
 
37
/* size of the string which reads the input data
 
38
   if your lines are longer than some 500 reals, increase the value
 
39
   */
 
40
#define INPUT_SIZE 1024
 
41
 
 
42
/* The possible names of the verbosity levels */
 
43
#define VER_INPUT 0x1
 
44
#define VER_USR1 0x2
 
45
#define VER_USR2 0x4
 
46
#define VER_USR3 0x8
 
47
#define VER_USR4 0x10
 
48
#define VER_USR5 0x20
 
49
#define VER_USR6 0x40
 
50
#define VER_FIRST_LINE 0x80
 
51
 
 
52
/* Uncomment the variable to get rid of the initial Version message */
 
53
/*#define OMIT_WHAT_I_DO*/
 
54
 
 
55
#define sqr(x) ((x)*(x))
 
56
 
 
57
extern void check_alloc(void *);
 
58
extern void variance(const NDArray &,octave_idx_type,double *,double *);
 
59
 
 
60
extern void rescale_data(Matrix &x,octave_idx_type,octave_idx_type,\
 
61
                         double *,double *);
 
62
extern void rescale_data(NDArray &x,octave_idx_type, double *,double *);
 
63
 
 
64
extern octave_idx_type exclude_interval(octave_idx_type,long,long,
 
65
                                      unsigned long*,octave_idx_type*);
 
66
 
 
67
extern octave_idx_type find_multi_neighbors(const Matrix &,
 
68
                                            const MArray<octave_idx_type> &,
 
69
                                            long *,double **,
 
70
                                            octave_idx_type, octave_idx_type, 
 
71
                                            octave_idx_type, octave_idx_type,
 
72
                                            double,unsigned long *);
 
73
extern octave_idx_type find_multi_neighbors(const double **,
 
74
                                            octave_idx_type **,
 
75
                                            long *,const double **,
 
76
                                            octave_idx_type, octave_idx_type, 
 
77
                                            octave_idx_type, octave_idx_type,
 
78
                                            double,unsigned long *);
 
79
 
 
80
extern octave_idx_type find_neighbors(double *,octave_idx_type **,
 
81
                                      octave_idx_type *, double *,
 
82
                                      octave_idx_type, octave_idx_type,
 
83
                                      octave_idx_type, octave_idx_type,
 
84
                                      double eps, octave_idx_type *);
 
85
 
 
86
extern void make_box(double *,octave_idx_type **,octave_idx_type *,
 
87
                     octave_idx_type , octave_idx_type , octave_idx_type ,
 
88
                     octave_idx_type , double);
 
89
 
 
90
extern void make_multi_box(const Matrix &,MArray<octave_idx_type> &,
 
91
                           long *,octave_idx_type,octave_idx_type,
 
92
                           octave_idx_type,octave_idx_type,
 
93
                           octave_idx_type,double);
 
94
extern void make_multi_box(const double **,octave_idx_type **,
 
95
                           long *,octave_idx_type,octave_idx_type,
 
96
                           octave_idx_type,octave_idx_type,
 
97
                           octave_idx_type,double);
 
98
 
 
99
extern void  solvele(double**,double *,octave_idx_type);
 
100
 
 
101
extern void invert_matrix(double**,double **,octave_idx_type);
 
102
/* routines from eigen.cc */
 
103
extern void eigen(double**,octave_idx_type,double*);
 
104
#ifdef __cplusplus
 
105
extern "C" {
 
106
#endif
 
107
 
 
108
extern int scan_help(int,char**);
 
109
extern double *get_series(char *,unsigned long *,unsigned long,
 
110
                   unsigned int,unsigned int);
 
111
extern double **get_multi_series(char *,unsigned long *,unsigned long,
 
112
                         unsigned int *,char *,char,unsigned int);
 
113
 
 
114
extern char* search_datafile(int, char**,unsigned int*,unsigned int);
 
115
extern char* check_option(char**,int,int,int);
 
116
 
 
117
extern void test_outfile(char*);
 
118
 
 
119
 
 
120
extern unsigned int** make_multi_index(unsigned int,unsigned int,unsigned int);
 
121
  /*only used for nrlazy. Will be removed with nrlazy */
 
122
extern void make_multi_box2(double **,long **,long *,unsigned long,
 
123
                     unsigned int,unsigned int,unsigned int,
 
124
                     unsigned int,double);
 
125
 
 
126
 
 
127
 
 
128
extern char* myfgets(char *,int *,FILE *,unsigned int);
 
129
extern void what_i_do(char *, char *);
 
130
extern double* rand_arb_dist(double *,unsigned long,unsigned long,
 
131
                       unsigned int,unsigned long);
 
132
 
 
133
/* routines from rand.c */
 
134
extern void rnd_init(unsigned long);
 
135
extern unsigned long rnd_long();
 
136
extern unsigned long rnd_1279();
 
137
extern unsigned long rnd69069();
 
138
extern double gaussian(double);
 
139
 
 
140
 
 
141
#ifdef __cplusplus
 
142
}
 
143
#endif
 
144
 
 
145
#endif