Table of Contents

Module: ghmmhelper /amd/bernoulli/1/home/abt_vin/georgi/hmm/0.7/ghmm//ghmmwrapper/ghmmhelper.py

Miscellaneous helper functions for ghmm.py.

Imported modules   
import ghmmwrapper
import math
from modhmmer import *
import os.path
from random import *
Functions   
arrayd2list
arrayint2list
classNumber
extract_in_cos
extract_out
extract_out_cos
list2arrayd
list2arrayint
list2matrixd
list2matrixint
matrixd2list
matrixint2list
  arrayd2list 
arrayd2list ( carray,  length )

converts C double array to python list.

  arrayint2list 
arrayint2list ( carray,  length )

converts C double array to python list.

  classNumber 
classNumber ( A )

Returns the number of transition classes in the matrix A

  extract_in_cos 
extract_in_cos (
        transmat,
        cos,
        state,
        )

Helper function for building HMMs from matrices: Used for transition matrices with cos transition classes.

Extract ingoing transitions for state from the complete list of transition matrices

Allocates: .in_id vector and .in_a array (of size cos x N)

  extract_out 
extract_out ( lisprobs )

Helper function for building HMMs from matrices: Used for transition matrices without transition classes.

Extract out-/ingoing transitions from the row-vector resp. the column vector (corresponding to incoming transitions) of the transition matrix

Allocates: .[out|in]_id and .[out|in]_a vectors

  extract_out_cos 
extract_out_cos (
        transmat,
        cos,
        state,
        )

Helper function for building HMMs from matrices: Used for transition matrices with cos transition classes.

Extract outgoing transitions for state from the complete list of transition matrices

Allocates: .out_id vector and .out_a array (of size cos x N)

  list2arrayd 
list2arrayd ( lisems )

converts python list to C double array

  list2arrayint 
list2arrayint ( lisems )

converts python list to C int array

  list2matrixd 
list2matrixd ( matrix )

Allocation and initialization of a double** based on a two dimensional Python list (list of lists). The number of elements in each column can vary.

  list2matrixint 
list2matrixint ( matrix )

Allocation and initialization of an int** based on a two dimensional Python list (list of lists). The number of elements in each column can vary.

  matrixd2list 
matrixd2list (
        cmatrix,
        row,
        col,
        )

  matrixint2list 
matrixint2list (
        cmatrix,
        row,
        col,
        )

Classes   

double_array

A C-double array

twodim_double_array

Two-dimensional C-Double Array


Table of Contents

This document was automatically generated on Fri Jan 20 14:56:59 2006 by HappyDoc version WORKING