//ProbMatrix.cpp //Coded by Vishakh (vishakh@uci.edu) //ICS 175A, Winter 2004 //Project: Motif detection in yeast //Purpose: Encapsulates the functionality of a probability matrix #include "ProbMatrix.h" /* *FUNCTION: ProbMatrix(int size) *PURPOSE: Creates an empty probability matrix of size 'n'. *REMARKS: */ ProbMatrix::ProbMatrix(int size) { cols.resize(size); } /* *FUNCTION: ProbMatrix(DString seed) *PURPOSE: Creates a probability matrix based on the seed. *REMARKS: */ ProbMatrix::ProbMatrix(DString seed) { cols.resize(seed.size()); for(int i=0; i substrings) *PURPOSE: Recreates the matrix with probabilities calculated using the given array of strings *REMARKS: */ void ProbMatrix::updateMatrix(vector substrings) { ProbMatrix pm(cols.size()); //Store number of occurances in matrix for(int i=0; i getMatrix() *PURPOSE: Returns matrix for the GUI *REMARKS: */ vector ProbMatrix::getMatrix() { return cols; }