massspec/clustering.h
Go to the documentation of this file.00001 #ifndef _CLUSTERING_H_
00002 #define _CLUSTERING_H_
00003
00004
00005
00006
00007
00008
00019 typedef struct
00020 {
00021 int vertex_1;
00022 int vertex_2;
00023 float weight;
00024 } Edge;
00025
00026 typedef Edge* EdgePointer;
00027
00028
00029
00030
00031 Edge* EdgeArray_create(long nSize);
00032 EdgePointer* EdgePointerArray_create(long nSize);
00033 Edge** EdgeTriangularMatrix_create(long nSize);
00034 void EdgeTriangularMatrix_fprint(FILE* fp, Edge** matrix, long nSize);
00035
00036 int Edge_cmpByWeight(const void *p1, const void *p2);
00037 void EdgeArray_sortByWeight(Edge* edges, long nEdges);
00038
00039 int EdgePointer_cmpByWeight(const void *p1, const void *p2);
00040 void EdgePointerArray_sortByWeight(EdgePointer* edges, long nEdges);
00041
00042
00043 typedef struct
00044 {
00045 int vertex_1;
00046 int vertex_2;
00047 float rt_weight;
00048 float mz_weight;
00049 } MEdge;
00050
00051 typedef MEdge* MEdgePointer;
00052
00053 MEdge* MEdgeArray_create(long nSize);
00054 MEdgePointer* MEdgePointerArray_create(long nSize);
00055 MEdge** MEdgeTriangularMatrix_create(long nSize);
00056 void MEdgeTriangularMatrix_fprint(FILE* fp, MEdge** matrix, long nSize);
00057
00058 int MEdge_cmpByWeight(const void *p1, const void *p2);
00059 void MEdgeArray_sortByWeight(MEdge* edges, long nMEdges);
00060
00061 int MEdgePointer_cmpByWeight(const void *p1, const void *p2);
00062 void MEdgePointerArray_sortByWeight(MEdgePointer* edges, long nMEdges);
00063
00064 struct Clusterer
00065 {
00066 int nLinkageType;
00067 float dLinkageRTThreshold;
00068 float dLinkageMZThreshold;
00069 float dAbundanceThreshold;
00070 int nDimensions;
00071 };
00072
00073 typedef struct Clusterer Clusterer;
00074
00075 void Clusterer_init(Clusterer* cl, float dRTThr, float dMZThr);
00076
00077
00078 enum {CLUSTERING_SINGLE_LINK, CLUSTERING_AVERAGE_LINK, CLUSTERING_HYBRID_LINK};
00079
00080 void FPeak2iPointerSet_singleLinkageClustering(FPeak2iPointerSet* SET, Clusterer* clust);
00081 void FPeak2iPointerSet_averageLinkageClustering(FPeak2iPointerSet* SET, Clusterer* clust);
00082 void FPeak2iPointerSet_hybridLinkageClustering(FPeak2iPointerSet* SET, Clusterer* clust);
00083 void FPeak2iPointerSet_cluster(FPeak2iPointerSet* SET, Clusterer* clust);
00084
00085
00086
00087 #endif
00088
Generated on Sun Feb 13 01:05:56 2005 for MapQuant by
1.3.7