Statistics
| Revision:

root / tmp / org.txm.statsengine.r.core.win32 / res / win32 / include / R_ext / PrtUtil.h @ 2486

History | View | Annotate | Download (2.3 kB)

1
/*
2
 *  R : A Computer Language for Statistical Data Analysis
3
 *  Copyright (C) 1998-2012    The R Core Team
4
 *
5
 *  This program is free software; you can redistribute it and/or modify
6
 *  it under the terms of the GNU Lesser General Public License as published by
7
 *  the Free Software Foundation; either version 2.1 of the License, or
8
 *  (at your option) any later version.
9
 *
10
 *  This program is distributed in the hope that it will be useful,
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 *  GNU Lesser General Public License for more details.
14
 *
15
 *  You should have received a copy of the GNU Lesser General Public License
16
 *  along with this program; if not, a copy is available at
17
 *  http://www.r-project.org/Licenses/
18
 */
19

    
20
/*
21
 *  These functions are not part of the API.
22
 */
23
#ifndef PRTUTIL_H_
24
#define PRTUTIL_H_
25

    
26
#include <Rinternals.h> // for R_xlen_t
27
#include <R_ext/Complex.h>
28

    
29
#define formatLogical      Rf_formatLogical
30
#define formatInteger      Rf_formatInteger
31
#define formatReal         Rf_formatReal
32
#define formatComplex      Rf_formatComplex
33
#define EncodeLogical      Rf_EncodeLogical
34
#define EncodeInteger      Rf_EncodeInteger
35
#define EncodeReal         Rf_EncodeReal
36
#define EncodeComplex      Rf_EncodeComplex
37
#define VectorIndex        Rf_VectorIndex
38
#define printIntegerVector Rf_printIntegerVector
39
#define printRealVector    Rf_printRealVector
40
#define printComplexVector Rf_printComplexVector
41

    
42
#ifdef  __cplusplus
43
extern "C" {
44
#endif
45

    
46
/* Computation of printing formats */
47
void formatLogical(int *, R_xlen_t, int *);
48
void formatInteger(int *, R_xlen_t, int *);
49
void formatReal(double *, R_xlen_t, int *, int *, int *, int);
50
void formatComplex(Rcomplex *, R_xlen_t, int *, int *, int *, int *, int *, int *, int);
51

    
52
/* Formating of values */
53
const char *EncodeLogical(int, int);
54
const char *EncodeInteger(int, int);
55
const char *EncodeReal(double, int, int, int, char);
56
const char *EncodeComplex(Rcomplex, int, int, int, int, int, int, char);
57

    
58
/* Printing */
59
int        IndexWidth(R_xlen_t);
60
void VectorIndex(R_xlen_t, int);
61

    
62
//void printLogicalVector(int *, R_xlen_t, int);
63
void printIntegerVector(int *, R_xlen_t, int);
64
void printRealVector   (double *, R_xlen_t, int);
65
void printComplexVector(Rcomplex *, R_xlen_t, int);
66

    
67
#ifdef  __cplusplus
68
}
69
#endif
70

    
71
#endif /* PRTUTIL_H_ */