Example #1
0
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 );
}
Example #2
0
static void EDGE_GetWeight( DaoProcess *proc, DaoValue *p[], int N )
{
	DaoxEdge *self = (DaoxEdge*) p[0];
	DaoProcess_PutFloat( proc, self->weight );
}
Example #3
0
static void GMF_GetGraphFlow( DaoProcess *proc, DaoValue *p[], int N )
{
	DaoxGraphMaxFlow *self = (DaoxGraphMaxFlow*) p[0];
	DaoProcess_PutFloat( proc, self->maxflow );
}
Example #4
0
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 ] );
}
Example #5
0
static void SYS_Clock( DaoProcess *proc, DaoValue *p[], int N )
{
	DaoProcess_PutFloat( proc, ((float)clock())/CLOCKS_PER_SEC );
}