~ubuntu-branches/debian/sid/r-cran-surveillance/sid

« back to all changes in this revision

Viewing changes to src/stcd-assuncaocorrea.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2009-10-21 14:25:07 UTC
  • mfrom: (2.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091021142507-qxc714tmnb8thj22
Tags: 1.1.2-1
* New upstream version
* debian/control:
  - XS-Autobuild: yes to enable autobuilding
  - Build-Depends: r-cran-matrix
  - Standards-Version: 3.8.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * File based on algoritmos.cpp and sv.cpp from the TerraView plugin.
 
3
 * C++ source originally created by Marcos Oliveira Prates from the
 
4
 * Department of Statistics, UFMG, Brazil on 06 April 2006
 
5
 * 
 
6
 * R interface by Michael Höhle initiated on 12 Jan 2009
 
7
 * Note: Some function names are in Portugese
 
8
 */
 
9
 
 
10
 
 
11
#ifndef SRSPACETIME_H
 
12
#define SRSPACETIME_H
 
13
 
 
14
#include <list>
 
15
#include <valarray>
 
16
 
 
17
struct SVEvent {
 
18
 double x, y, t;
 
19
 friend bool operator<(const SVEvent &a, const SVEvent &b) {
 
20
  return (a.t < b.t);
 
21
 }
 
22
};
 
23
 
 
24
//STL is used (check its use)
 
25
typedef std::list<SVEvent> SVEventLst;
 
26
 
 
27
//Functions provided in sr-spacetime.cc
 
28
int CalculaNCj(short **MSpace, const int EvtN, const int EvtJ);
 
29
int ContaEvt(short **MSpace, const int EvtN, const int EvtJ);
 
30
int SistemadeVigilancia(SVEventLst &, const double RaioC, const double epslon, 
 
31
                        std::valarray<double> &R);
 
32
int CalculaLambda(SVEventLst &ev, const double RaioC, const double epslon, 
 
33
                  std::valarray<double> &R, unsigned int &numObs);
 
34
 
 
35
// Hoehle wrapper function to create SVEvent list
 
36
//void SRspacetime(double *x, double *y, double *t, long *n, double *radius, double *epsilon, double *Rarray);
 
37
 
 
38
 
 
39
#endif