GraphAlignment/src/GraphAlignment.h File Reference

Graph alignment module. More...

#include "R.h"
#include "Rinternals.h"
#include "Rdefines.h"
#include "R_ext/Rdynload.h"
#include "GA_message.h"
#include "GA_vector.h"
#include "GA_matrix.h"

Go to the source code of this file.

Typedefs

typedef enum GADirectedMode_Impl GADirectedMode

Enumerations

enum  GADirectedMode_Impl { GA_DIRECTED_ENABLED = 1, GA_DIRECTED_DISABLED = 0 }

Functions

void R_init_GraphAlignment (DllInfo *info)
void R_unload_GraphAlignment (DllInfo *info)
void GA_msg_R (const char *text, GAMessageLevel level)
GAVectorIntGA_linear_assignment_solve (GAMatrixInt *costMatrix)
GAMatrixRealGA_encode_directed_graph (GAMatrixReal *matrix, GAVectorInt *p)
SEXP GA_encode_directed_graph_R (SEXP matrix, SEXP p)
SEXP GA_linear_assignment_solve_R (SEXP costMatrix)
GADirectedMode GA_directed_mode_from_R (SEXP robj)
GAMatrixRealGA_compute_M (GAMatrixReal *na, GAMatrixReal *nb, GAMatrixReal *r, GAVectorInt *p, GAMatrixReal *linkScore, GAMatrixReal *selfLinkScore, GAVectorReal *nodeScore1, GAVectorReal *nodeScore2, GAVectorReal *lookupLink, GAVectorReal *lookupNode, GAClampMode clamp)
SEXP GA_compute_M_R (SEXP a, SEXP b, SEXP r, SEXP p, SEXP linkScore, SEXP selfLinkScore, SEXP nodeScore1, SEXP nodeScore2, SEXP lookupLink, SEXP lookupNode, SEXP clamp)


Detailed Description

Graph alignment module.

This module provides various functions used by the graph alignment R package, such as the wrapper for the linear assignment problem solver and the function which computes the score matrix M.


Typedef Documentation

typedef enum GADirectedMode_Impl GADirectedMode

Directed mode.


Enumeration Type Documentation

enum GADirectedMode_Impl

Directed mode (implementation).

The directed mode specifies whether input matrices should be treated as adjacency matrices of directed graphs.

Enumerator:
GA_DIRECTED_ENABLED  Directed mode: enabled.
GA_DIRECTED_DISABLED  Directed mode: disabled.


Function Documentation

GAMatrixReal* GA_compute_M ( GAMatrixReal na,
GAMatrixReal nb,
GAMatrixReal r,
GAVectorInt p,
GAMatrixReal linkScore,
GAMatrixReal selfLinkScore,
GAVectorReal nodeScore1,
GAVectorReal nodeScore2,
GAVectorReal lookupLink,
GAVectorReal lookupNode,
GAClampMode  clamp 
)

Compute score matrix.

Compute the complete score matrix M. The matrix which is returned will be referenced and should be destroyed by using GA_matrix_destroy_real() when it is not needed anymore.

Parameters:
na adjacency matrix for network A
nb adjacency matrix for network B
r node similarity matrix
p permutation vector
linkScore link score matrix
selfLinkScore self link score matrix
nodeScore1 node score matrix (1)
nodeScore2 node score matrix (2)
lookupLink link bin lookup table
lookupNode node bin lookup table
clamp clamp mode for bin lookups
Returns:
the score matrix M
See also:
GA_get_bin_number()

SEXP GA_compute_M_R ( SEXP  a,
SEXP  b,
SEXP  r,
SEXP  p,
SEXP  linkScore,
SEXP  selfLinkScore,
SEXP  nodeScore1,
SEXP  nodeScore2,
SEXP  lookupLink,
SEXP  lookupNode,
SEXP  clamp 
)

Compute score matrix (R).

Compute the complete score matrix M.

Parameters:
a adjacency matrix for network A
b adjacency matrix for network B
r node similarity matrix
p permutation vector
linkScore link score matrix
selfLinkScore self link score matrix
nodeScore1 node score matrix (1)
nodeScore2 node score matrix (2)
lookupLink link bin lookup table
lookupNode node bin lookup table
clamp clamp mode for bin lookups
Returns:
the score matrix M

GADirectedMode GA_directed_mode_from_R ( SEXP  robj  ) 

Get directed mode from R object (real).

Get the directed mode corresponding to the value of the specified R object.

Parameters:
robj R object
Returns:
directed mode

GAMatrixReal* GA_encode_directed_graph ( GAMatrixReal matrix,
GAVectorInt p 
)

Encode directed graph.

Encode an adjacency matrix for a directed graph into a symmetric matrix.

This is done by setting entries (i, j) and (j, i) of the target matrix m' to 1 if entry m[i, j] = 1 and i > j and to -1 if m[i, j] = 1 and j > i. A permutation will be applied to i, j if specified as an argument.

The matrix which is returned will be referenced and should be destroyed by using GA_matrix_destroy_real() when it is not needed anymore.

Parameters:
matrix matrix
p permutation vector
Returns:
symmetric matrix

SEXP GA_encode_directed_graph_R ( SEXP  matrix,
SEXP  p 
)

Encode directed graph (R).

Encode an adjacency matrix for a directed graph into a symmetric matrix.

Parameters:
matrix matrix
p permutation vector
Returns:
symmetric matrix

GAVectorInt* GA_linear_assignment_solve ( GAMatrixInt costMatrix  ) 

Solve linear assignment problem.

Solve the linear assignment problem specified by the cost matrix. The solution returned is a vector of columns assigned to rows. The vector which is returned will be referenced and should be destroyed by using GA_vector_destroy_int() when it is not needed anymore.

Parameters:
costMatrix cost matrix
Returns:
Solution of the linear assignment problem

SEXP GA_linear_assignment_solve_R ( SEXP  costMatrix  ) 

Solve linear assignment problem (R).

Solve the linear assignment problem specified by the cost matrix. The solution returned is a vector of rows assigned to columns.

Parameters:
costMatrix cost matrix
Returns:
Solution of the linear assignment problem

void GA_msg_R ( const char *  text,
GAMessageLevel  level 
)

Report a message.

Report a message using the appropriate R functions.

Parameters:
text text of the message
level message level

void R_init_GraphAlignment ( DllInfo *  info  ) 

Module initialization hook.

Hook function for module initialization.

Parameters:
info dynamic link library info

void R_unload_GraphAlignment ( DllInfo *  info  ) 

Module unloading hook.

Hook function for module unloading.

Parameters:
info dynamic link library info


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