void read_cells_and_create_start_system ( void ) { int dim,n,fail,*d,r,len,k,nbsols,mv; double *c; char ans = 'y'; fail = celcon_read_mixed_cell_configuration(); printf("\nReading a system to initialize the symbol table..."); fail = read_standard_target_system(); fail = celcon_dimension_of_points(&dim); printf("dimension of the lifted points : %d\n",dim); fail = show_mixture(dim,&r); fail = celcon_standard_random_coefficient_system(); printf("The random coefficient start system :\n"); fail = celcon_write_standard_random_coefficient_system(); fail = celcon_standard_polyhedral_homotopy(); fail = celcon_number_of_cells(&len); while (ans == 'y') { printf("Give a number to a mixed cell (<= %d) : ", len); scanf("%d",&k); fail = celcon_solve_standard_start_system(k,&nbsols); printf(" -> found %d start solutions from cell %d\n",nbsols,k); fail = celcon_mixed_volume(k,&mv); if (nbsols == mv) printf("#start solutions equals mixed volume %d, ok\n",mv); else printf("#start solutions does not equal mixed volume %d!!!\n",mv); printf("Do you wish to test another cell (y/n) "); scanf("%c",&ans); /* skip new line symbol */ ans = getchar(); } }
int compute_mixed_volume( void ) { int fail,mv,len,dim,r; fail = syscon_read_standard_system(); printf("\nThe system in the container : \n"); fail = syscon_write_standard_system(); fail = mixed_volume(&mv); printf("\nThe mixed volume : %d\n",mv); fail = celcon_number_of_cells(&len); printf("\nnumber of mixed cells : %d\n",len); fail = celcon_dimension_of_points(&dim); printf("dimension of the lifted points : %d\n",dim); fail = show_mixture(dim,&r); }
void retrieve_dimensions ( int myid, int *nspt, int *dim ) { int fail, *mix; if(myid == 0) { fail = celcon_read_mixed_cell_configuration(); printf("\nReading a system to initialize the symbol table..."); fail = read_standard_target_system(); fail = define_output_file(); fail = celcon_dimension_of_points(dim); mix = (int*)calloc((*dim-1), sizeof(int)); fail = celcon_type_of_mixture(nspt,mix); if(v>0) printf("\nThe number of different support is %d\n",*nspt); if(v>0) printf("The dimension of lifted points is %d\n",*dim); } MPI_Bcast(nspt,1,MPI_INT,0,MPI_COMM_WORLD); MPI_Bcast(dim,1,MPI_INT,0,MPI_COMM_WORLD); }
void read_and_retrieve ( void ) { int n,fail,*d,r; double *c; int len,dim; char ans; fail = celcon_read_mixed_cell_configuration(); printf("Do you wish to see the cells ? (y/n) "); ans = getchar(); if(ans == 'y') fail = celcon_write_mixed_cell_configuration(); fail = celcon_number_of_cells(&len); printf("\nnumber of mixed cells : %d\n",len); fail = celcon_dimension_of_points(&dim); printf("dimension of the lifted points : %d\n",dim); fail = show_mixture(dim,&r); fail = write_lifted_supports(dim); fail = query_cell(dim,r); }
void read_cells_and_solve_start_system ( void ) { int fail,dim,r,len,prcs; fail = celcon_read_mixed_cell_configuration(); printf("\nReading a system to initialize the symbol table..."); fail = read_standard_target_system(); fail = define_output_file(); fail = celcon_dimension_of_points(&dim); printf("dimension of the lifted points : %d\n",dim); fail = show_mixture(dim,&r); fail = celcon_number_of_cells(&len); printf("number of cells in the configuration : %d\n",len); prcs = prompt_for_precision(); if(prcs == 0) solve_standard_start_system(len); else if(prcs == 1) solve_dobldobl_start_system(len); else if(prcs == 2) solve_quaddobl_start_system(len); else printf("invalid precision level\n"); }