void NodeDropped::setDNProp( RGrid* grid, GsTLGridProperty* prop ) { SGrid_cursor cursor = SGrid_cursor( *(grid->cursor()) ); int node_id; for (int i=0; i<path_size; i++) { node_id = cursor.node_id( nodes[i].first ); prop->set_value( nodes[i].second, node_id ); } }
void Layer_servo_system_sampler< RandNumberGenerator, ComputeLayerIndex >:: removeSimulatedNode( RGrid* grid, Grid_continuous_property* prop, vector<int>& grid_path ) { SGrid_cursor cursor = SGrid_cursor( *(grid->cursor()) ); int current_value; int node_id; int z; // layer index for (int i=0; i<grid_path.size(); i++) { node_id = cursor.node_id( grid_path[i] ); current_value = prop->get_value( node_id ); prop->set_not_informed( node_id ); z = getLayerIndex_( node_id ); current_histogram_[z][ current_value ] --; nb_of_data_[z] --; } }