multiAlign.h
资源名称:MSA_MST.rar [点击查看]
上传用户:szpanda
上传日期:2016-03-09
资源大小:9k
文件大小:1k
源码类别:
DNA
开发平台:
C/C++
- /* File: multiAlign.h */
- /* Author:Qichan Ma, Student No.:250494898 */
- #ifndef MULTIALIGN_H
- #define MULTIALIGN_H
- typedef struct {
- int u; /* one vertex of an edge */
- int v; /* the other vertex of an edge */
- int cost; /* the cost of an edge */
- } Edge;
- Edge *e; /* the edges array */
- int *parent; /* the parent array */
- int *rank; /* the rank array */
- int *heap; /* the heap used to sort edges and get the minimal cost edge */
- int hsize; /* the size of the heap */
- /* creat a new set whose only member is x */
- void Make_set(int x);
- /* unite the dynamic sets that contain x and y into one set */
- void Union(int x, int y);
- /* subroutine of Union */
- void Link(int x, int y);
- /* returns a pointer to the representative of the set containing x */
- int Find_set(int x);
- /* bulid the heap */
- void BuildMaxHeap(int n);
- /* adjust down the element in the heap */
- void AdjustDown (int r, int n);
- /* delete the minimal element from the heap */
- int DeleteMax();
- /* do the multiple sequence alignment using Kruskal's maximum spanning tree algorithm */
- void MST_Kruskal();
- /* compute the pairwise alignment score */
- int AlignScore(char *x, char *y);
- /* output the multiple alignment & SP score */
- void printMultiAlign();
- #endif