Home | History | Annotate | Download | only in src

Lines Matching refs:graph

56     CvGraph* graph;
58 int N; //graph size
92 void _MarkNodes( CvGraph* graph )
95 for( int i = 0; i < graph->total; i++ )
97 CvGraphVtx* ver = cvGetGraphVtx( graph, i );
105 void _FillAdjMatrix( CvGraph* graph, int** connected, int reverse )
108 for( int i = 0; i < graph->total; i++ )
110 for( int j = 0; j < graph->total; j++ )
114 //memset( connected[i], 0, sizeof(int)*graph->total );
115 CvGraphVtx* ver = cvGetGraphVtx( graph, i );
129 void cvStartFindCliques( CvGraph* graph, CvCliqueFinder* finder, int reverse, int weighted, int weighted_edges )
137 finder->vertex_weights = (float*)malloc( sizeof(float)*(graph->total+1));
138 finder->cur_weight = (float*)malloc( sizeof(float)*(graph->total+1));
139 finder->cand_weight = (float*)malloc( sizeof(float)*(graph->total+1));
143 for( i = 0 ; i < graph->total; i++ )
145 CvGraphWeightedVtx* ver = (CvGraphWeightedVtx*)cvGetGraphVtx( graph, i );
158 finder->edge_weights = (float*)malloc( sizeof(float)*(graph->total)*(graph->total));
159 //finder->cur_weight = (float*)malloc( sizeof(float)*(graph->total+1));
160 //finder->cand_weight = (float*)malloc( sizeof(float)*(graph->total+1));
164 memset( finder->edge_weights, 0, sizeof(float)*(graph->total)*(graph->total) );
165 for( i = 0 ; i < graph->total; i++ )
167 CvGraphVtx* ver1 = cvGetGraphVtx( graph, i );
169 for( int j = i ; j < graph->total; j++ )
171 CvGraphVtx* ver2 = cvGetGraphVtx( graph, j );
173 CvGraphEdge* edge = cvFindGraphEdgeByPtr( graph, ver1, ver2 );
177 finder->edge_weights[ i * graph->total + j ] =
178 finder->edge_weights[ j * graph->total + i ] = ((CvGraphWeightedEdge*)edge)->weight;
188 int N = finder->N = graph->total;
210 _MarkNodes( graph );
211 _FillAdjMatrix( graph, finder->adj_matr, reverse );
265 // int N = finder->N; //graph size
490 void cvBronKerbosch( CvGraph* graph )
494 int N = graph->total;
519 _MarkNodes( graph );
520 _FillAdjMatrix( graph, connected, 0 );