Skip to content

Commit

Permalink
Added test for being ternary as part of being (co)network.
Browse files Browse the repository at this point in the history
  • Loading branch information
discopt committed Sep 18, 2024
1 parent d6ff9e5 commit e405fce
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cmr/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,20 @@ CMR_ERROR CMRnetworkTestTranspose(CMR* cmr, CMR_CHRMAT* matrix, bool* pisConetwo

clock_t totalClock = clock();

if (!CMRchrmatIsTernary(cmr, matrix, psubmatrix))
{
if (pisConetwork)
*pisConetwork = false;
return CMR_OKAY;
}

double remainingTime = timeLimit - (clock() - totalClock) * 1.0 / CLOCKS_PER_SEC;
CMR_GRAPH_EDGE* forestEdges = NULL;
CMR_GRAPH_EDGE* coforestEdges = NULL;
CMR_GRAPH* graph = NULL;
bool isConetwork;
CMR_ERROR error = CMRcographicTestSupport(cmr, matrix, &isConetwork, &graph, &forestEdges, &coforestEdges,
/* TODO: pass psubmatrix once efficient */ NULL, stats ? &stats->graphic : NULL, remainingTime);
/* TODO: pass psubmatrix once search for it is efficient */ NULL, stats ? &stats->graphic : NULL, remainingTime);
if (error == CMR_ERROR_TIMEOUT)
{
if (stats)
Expand Down

0 comments on commit e405fce

Please sign in to comment.