Exemplo n.º 1
0
int main (int argc, char **argv) {
        printf ("Example program for calculating Pareto optimal elements\n");
        printf ("    author: <*****@*****.**>\n");

/* initialize random seed: */
#ifdef WIN32
        srand (0);
#else
        srand (time (NULL));
#endif

        Pareto< long, int > pareto;

        // select 12 random objects with each 3 values
        const int number_elements = 12;
        const int nvals = 3;

        const int nmax = 4;
        std::vector< long > multi_value (nvals);
        printf ("adding 12 random elements\n");
        for (int i = 0; i < number_elements; i++) {
                for (int j = 0; j < nvals; j++)
                        multi_value[j] = rand () % nmax;

                pareto.addvalue (multi_value, i);
                printf ("  element %d: ", i);
                detail::display_vector (multi_value);
                printf ("\n");
        }

        printf ("The pareto optimal values are:\n");
        pareto.show (3);
}
Exemplo n.º 2
0
void GdsRenderStateGroup::SetSamplerState( int index , int iop1 , int iop2 )
{	
	VALUE val( iop1 , iop2 );
	MULTI_VALUE multi_value( index , val );
	m_Opt_SamplerState.push_back( multi_value );
}
Exemplo n.º 3
0
void GdsRenderStateGroup::SetTextureStageState( int index , int iop1 , int iop2 )
{
	VALUE val( iop1 , iop2 );
	MULTI_VALUE multi_value( index , val );
	m_Opt_MultiTexturing.push_back( multi_value );
}