Main Page | Directories | File List | Globals

bCrosstab.c File Reference

#include "bCrosstab.h"

Functions

static R_INLINE void ind_permute (int i[], int nnz, const int perm[])
static R_INLINE void make_upper_triangular (int i[], int j[], int nnz)
static void symbolic_right_unit_sm (int anc, const int Parent[], SEXP C)
static void symbolic_right_unit_mm_trans (int anc, const int Parent[], SEXP C)
static void block_update (SEXP L, SEXP ZZpO, int j, int k, int i)
static void bCrosstab_permute (SEXP ctab, int nf, int jj, const int nlev[], const int iperm[])
static void symmetric_permute (SEXP A, int nlev, const int iperm[])
static void factor_levels_permute (SEXP dest, SEXP src, const int perm[], const int iperm[])
void lmer_populate (SEXP val)

Function Documentation

static void bCrosstab_permute SEXP  ctab,
int  nf,
int  jj,
const int  nlev[],
const int  iperm[]
[static]
 

Permute the levels of one of the grouping factors in a bCrosstab object

Parameters:
ctab Pointer to a bCrosstab object
nf number of factors in ctab
jj index (0-based) of the factor levels to permute
ncj number of columns in level jj
perm permutation (0-based) to apply
pperm inverse of the permutation

static void block_update SEXP  L,
SEXP  ZZpO,
int  j,
int  k,
int  i
[static]
 

Update a block of L in the blocked crosstabulation

Parameters:
ctab pointer to a blocked crosstabulation object
j index of updating column
k column index of block to be updated
i row index of block to be updated (j < k <= i)

static void factor_levels_permute SEXP  dest,
SEXP  src,
const int  perm[],
const int  iperm[]
[static]
 

Apply a permutation vector to the levels of a factor.

The dest pointer is assumed to point to a copy of the src pointer's contents.

Parameters:
dest pointer to the destination factor
src pointer to the source factor
perm permutation vector (0-based)
iperm inverse permutation vector (0-based)

static R_INLINE void ind_permute int  i[],
int  nnz,
const int  perm[]
[static]
 

Apply a permutation to an index vector

Parameters:
i vector of 0-based indices
nnz length of vector i
perm 0-based permutation vector of length max(i)

void lmer_populate SEXP  val  ) 
 

Create and populate slots in an lmer object from the blocked crosstabulation.

Parameters:
val Pointer to an lmer object

static R_INLINE void make_upper_triangular int  i[],
int  j[],
int  nnz
[static]
 

Force indices to be in the upper triangle of a matrix

Parameters:
i vector of 0-based row indices
j vector of 0-based column indices
nnz length of index vectors

static void symbolic_right_unit_mm_trans int  anc,
const int  Parent[],
SEXP  C
[static]
 

Replace the structure of C by the structure of CA^{-T}

Parameters:
A a unit lower triangular dgBCMatrix object
C a dgBCMatrix object to be updated

static void symbolic_right_unit_sm int  anc,
const int  Parent[],
SEXP  C
[static]
 

Replace the structure of C by the structure of CL^{-1} where L is the unit lower triangular sparse matrix from an LDL' Cholesky decomposition

Parameters:
anc number of columns in A
Parent parent array for A
C a dgBCMatrix object to be updated

static void symmetric_permute SEXP  A,
int  nlev,
const int  iperm[]
[static]
 


Generated on Fri Feb 18 08:49:34 2005 for Matrix by  doxygen 1.4.1