GraphAlignment/src/GA_matrix_R.h File Reference

R utility functions for matrix types. More...

#include "R.h"
#include "Rinternals.h"
#include "Rdefines.h"
#include "GA_matrix.h"

Go to the source code of this file.

Functions

GAMatrixIntGA_matrix_from_R_int (SEXP robj)
SEXP GA_matrix_to_R_int (GAMatrixInt *matrix)
GAMatrixRealGA_matrix_from_R_real (SEXP robj)
SEXP GA_matrix_to_R_real (GAMatrixReal *matrix)


Detailed Description

R utility functions for matrix types.

This module provides functions for handling conversions between the matrix types of the graph alignment package C implementation and the internal R objects (SEXP) which represent matrices.


Function Documentation

GAMatrixInt* GA_matrix_from_R_int ( SEXP  robj  ) 

Create matrix from R object (int).

Create a matrix of integers from an R object. The new matrix will be referenced and should be destroyed by using GA_matrix_destroy_int() when it is not needed anymore.

Parameters:
robj R object.
Returns:
Pointer to a matrix, or 0 if an error occurs.
See also:
GA_matrix_destroy_int

GAMatrixReal* GA_matrix_from_R_real ( SEXP  robj  ) 

Create matrix from R object (real).

Create a matrix of real numbers from an R object. The new matrix will be referenced and should be destroyed by using GA_matrix_destroy_real() when it is not needed anymore.

Parameters:
robj R object.
Returns:
Pointer to a matrix, or 0 if an error occurs.
See also:
GA_matrix_destroy_real

SEXP GA_matrix_to_R_int ( GAMatrixInt matrix  ) 

Create R object from matrix (int).

Create an R object from a matrix of integers.

Parameters:
matrix Matrix.
Returns:
R object.

SEXP GA_matrix_to_R_real ( GAMatrixReal matrix  ) 

Create R object from matrix (real).

Create an R object from a matrix of real numbers.

Parameters:
matrix Matrix.
Returns:
R object.


Generated on Thu Aug 16 15:28:41 2007 for Graphalignment(Rpackage) by  doxygen 1.5.1