static void GMF_GetEdgeFlow( DaoProcess *proc, DaoValue *p[], int N ) { DaoxGraphMaxFlow *self = (DaoxGraphMaxFlow*) p[0]; DaoxEdge *edge = (DaoxEdge*) p[1]; if( DaoxGraphData_IsAssociated( (DaoxGraphData*)self, edge->graph, proc ) == 0 ) return; DaoProcess_PutFloat( proc, edge->X.MF->flow_fw ); }
static void EDGE_GetWeight( DaoProcess *proc, DaoValue *p[], int N ) { DaoxEdge *self = (DaoxEdge*) p[0]; DaoProcess_PutFloat( proc, self->weight ); }
static void GMF_GetGraphFlow( DaoProcess *proc, DaoValue *p[], int N ) { DaoxGraphMaxFlow *self = (DaoxGraphMaxFlow*) p[0]; DaoProcess_PutFloat( proc, self->maxflow ); }
static void DaoBUF_GetFloat( DaoProcess *proc, DaoValue *p[], int N ) { Dao_Buffer *self = (Dao_Buffer*) p[0]; if( DaoBUF_CheckRange( self, p[1]->xInteger.value, sizeof(float), proc ) ) return; DaoProcess_PutFloat( proc, self->buffer.pFloat[ p[1]->xInteger.value ] ); }
static void SYS_Clock( DaoProcess *proc, DaoValue *p[], int N ) { DaoProcess_PutFloat( proc, ((float)clock())/CLOCKS_PER_SEC ); }