Main Page | Directories | File List | File Members | Related Pages

Utils.c File Reference

#include "party.h"

Include dependency graph for Utils.c:

Go to the source code of this file.

Functions

void C_kronecker (const double *A, const int m, const int n, const double *B, const int r, const int s, double *ans)
SEXP R_kronecker (SEXP A, SEXP B)
SEXP CR_svd (SEXP x, SEXP svdmem)
void C_MPinv (SEXP x, double tol, SEXP svdmem, SEXP ans)
SEXP R_MPinv (SEXP x, SEXP tol, SEXP svdmem)
double C_max (const double *x, const int n)
SEXP R_max (SEXP x)
void C_abs (double *x, int n)
SEXP R_abs (SEXP x)
void C_matprod (double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z)
SEXP R_matprod (SEXP x, SEXP y)
void C_matprodT (double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z)
SEXP R_matprodT (SEXP x, SEXP y)
void C_SampleNoReplace (int *x, int m, int k, int *ans)
SEXP R_permute (SEXP m)
SEXP R_rsubset (SEXP m, SEXP k)
int i_in_set (int i, int *iset, int p)
int C_i_in_set (int i, SEXP set)
int nrow (SEXP x)
int ncol (SEXP x)
int C_whichmax (double *pvalue, double *teststat, int ninputs)
SEXP R_whichmax (SEXP x, SEXP y)
SEXP R_listplus (SEXP a, SEXP b, SEXP which)
SEXP R_modify_response (SEXP x, SEXP vf)


Detailed Description

Some commonly needed utility functions.

Author:
Author
hothorn
Date:
Date
2006-04-05 16:24:23 +0200 (Wed, 05 Apr 2006)

Definition in file Utils.c.


Function Documentation

void C_abs double *  x,
int  n
 

absolute value

Parameters:
x numeric vector
n length(x)

Definition at line 259 of file Utils.c.

Referenced by C_absstandardize(), and R_abs().

int C_i_in_set int  i,
SEXP  set
 

Definition at line 473 of file Utils.c.

References i_in_set().

Referenced by C_get_node().

Here is the call graph for this function:

void C_kronecker const double *  A,
const int  m,
const int  n,
const double *  B,
const int  r,
const int  s,
double *  ans
 

Computes the Kronecker product of two matrices

Parameters:
A matrix
m nrow(A)
n ncol(A)
B matrix
r nrow(B)
s ncol(B)
ans return value; a pointer to a REALSXP-vector of length (mr x ns)

Definition at line 23 of file Utils.c.

Referenced by C_ExpectCovarLinearStatistic(), and R_kronecker().

void C_matprod double *  x,
int  nrx,
int  ncx,
double *  y,
int  nry,
int  ncy,
double *  z
 

matrix product x *% y

Parameters:
x a matrix
nrx number of rows of x
ncx number of cols of x
y a matrix
nry number of rows of y
ncy number of cols of y
z a matrix of dimension nrx x ncy

Definition at line 297 of file Utils.c.

Referenced by R_matprod(), and R_predictRF2().

void C_matprodT double *  x,
int  nrx,
int  ncx,
double *  y,
int  nry,
int  ncy,
double *  z
 

matrix product x *% t(y)

Parameters:
x a matrix
nrx number of rows of x
ncx number of cols of x
y a matrix
nry number of rows of y
ncy number of cols of y
z a matrix of dimension nrx x ncy

Definition at line 349 of file Utils.c.

Referenced by R_matprodT().

double C_max const double *  x,
const int  n
 

the maximum of a double vector

Parameters:
x vector
n its length

Definition at line 222 of file Utils.c.

Referenced by C_maxabsTestStatistic(), C_MonteCarlo(), C_Node(), and R_max().

void C_MPinv SEXP  x,
double  tol,
SEXP  svdmem,
SEXP  ans
 

Moore-Penrose inverse of a matrix

Parameters:
x matrix
tol a tolerance bound
svdmem an object of class `svd_mem'
ans return value; an object of class `ExpectCovarMPinv'

Definition at line 128 of file Utils.c.

References CR_svd(), PL2_MPinvSym, PL2_rankSym, and PL2_svdSym.

Referenced by C_LinStatExpCovMPinv(), and R_MPinv().

Here is the call graph for this function:

void C_SampleNoReplace int *  x,
int  m,
int  k,
int *  ans
 

compute a permutation of a (random subset of) 0:(m-1)

Parameters:
x an integer vector of length m
m integer
k integer
ans an integer vector of length k

Definition at line 397 of file Utils.c.

Referenced by C_GlobalTest(), C_MonteCarlo(), R_Ensemble(), R_permute(), and R_rsubset().

int C_whichmax double *  pvalue,
double *  teststat,
int  ninputs
 

Definition at line 492 of file Utils.c.

Referenced by C_Node(), and R_whichmax().

SEXP CR_svd SEXP  x,
SEXP  svdmem
 

C- and R-interface to La_svd (R/src/main/lapack.c)

Parameters:
x matrix
svdmem an object of class `svd_mem'

Definition at line 97 of file Utils.c.

References La_svd(), PL2_jobuSym, PL2_jobvSym, PL2_methodSym, PL2_pSym, PL2_sSym, PL2_svdSym, PL2_uSym, and PL2_vSym.

Referenced by C_MPinv().

Here is the call graph for this function:

int i_in_set int  i,
int *  iset,
int  p
 

determine if i is element of the integer vector set

Parameters:
i an integer
iset a pointer to an integer vector
p length(iset)

Definition at line 458 of file Utils.c.

Referenced by C_i_in_set(), and C_splitnode().

int ncol SEXP  x  ) 
 

Definition at line 484 of file Utils.c.

Referenced by C_GlobalTest(), C_IndependenceTest(), C_MonteCarlo(), C_Node(), C_splitnode(), R_Ensemble(), R_ExpectCovarInfluence(), R_ExpectCovarLinearStatistic(), R_LinearStatistic(), R_matprod(), R_matprodT(), R_MPinv(), R_Node(), R_PermutedLinearStatistic(), R_predictRF2(), R_split(), R_splitcategorical(), and R_TreeGrow().

int nrow SEXP  x  ) 
 

Definition at line 480 of file Utils.c.

Referenced by C_GlobalTest(), C_IndependenceTest(), R_ExpectCovarInfluence(), R_ExpectCovarLinearStatistic(), R_LinearStatistic(), R_matprod(), R_matprodT(), R_maxabsConditionalPvalue(), R_MPinv(), R_PermutedLinearStatistic(), R_predictRF2(), R_split(), and R_splitcategorical().

SEXP R_abs SEXP  x  ) 
 

R-interface to C_abs

Parameters:
x numeric vector

Definition at line 271 of file Utils.c.

References C_abs().

Here is the call graph for this function:

SEXP R_kronecker SEXP  A,
SEXP  B
 

R-interface to C_kronecker

Parameters:
A matrix
B matrix

Definition at line 52 of file Utils.c.

References C_kronecker().

Here is the call graph for this function:

SEXP R_listplus SEXP  a,
SEXP  b,
SEXP  which
 

Definition at line 527 of file Utils.c.

SEXP R_matprod SEXP  x,
SEXP  y
 

R-interface to C_matprod

Parameters:
x a matrix
y a matrix

Definition at line 318 of file Utils.c.

References C_matprod(), ncol(), and nrow().

Here is the call graph for this function:

SEXP R_matprodT SEXP  x,
SEXP  y
 

R-interface to C_matprodT

Parameters:
x a matrix
y a matrix

Definition at line 370 of file Utils.c.

References C_matprodT(), ncol(), and nrow().

Here is the call graph for this function:

SEXP R_max SEXP  x  ) 
 

R-interface to C_max

Parameters:
x numeric vector

Definition at line 238 of file Utils.c.

References C_max().

Here is the call graph for this function:

SEXP R_modify_response SEXP  x,
SEXP  vf
 

Definition at line 559 of file Utils.c.

References get_jointtransf(), get_transformation(), and get_variable().

Here is the call graph for this function:

SEXP R_MPinv SEXP  x,
SEXP  tol,
SEXP  svdmem
 

R-interface to C_MPinv

Parameters:
x matrix
tol a tolerance bound
svdmem an object of class `svd_mem'

Definition at line 187 of file Utils.c.

References C_MPinv(), ncol(), nrow(), PL2_MPinvSym, PL2_pSym, and PL2_rankSym.

Here is the call graph for this function:

SEXP R_permute SEXP  m  ) 
 

R-interface to C_SampleNoReplace: the permutation case

Parameters:
m integer

Definition at line 416 of file Utils.c.

References C_SampleNoReplace().

Here is the call graph for this function:

SEXP R_rsubset SEXP  m,
SEXP  k
 

R-interface to C_SampleNoReplace: the subset case

Parameters:
m integer
k integer

Definition at line 436 of file Utils.c.

References C_SampleNoReplace().

Here is the call graph for this function:

SEXP R_whichmax SEXP  x,
SEXP  y
 

Definition at line 517 of file Utils.c.

References C_whichmax().

Here is the call graph for this function:


Generated on Fri Aug 25 14:32:37 2006 for party by  doxygen 1.4.4