void Pg_points_graph::eliminate_details_dd( Path &path) const { /* * There is no path nothing to do */ if (path.empty()) return; Path newPath(path.start_id(), path.end_id()); auto edge_id = path.start_id() < 0? get_edge_id(path.start_id()) : -1; for (auto pathstop : path) { /* * skip points (no details) * except if ithe point its the starting point */ if (!((pathstop.node == path.start_id()) || (pathstop.node > 0))) { continue; } /* * Change costs only when the node is not: * - start_id * - directly connected to start_id */ if (pathstop.node != path.start_id()) { auto edge_ptr = get_edge_data(pathstop.edge); /* * edge found * and its not the edge directly connected to start_id() */ if (edge_ptr && edge_ptr->id != edge_id) { pathstop.cost = pathstop.node == edge_ptr->source? edge_ptr->cost : edge_ptr->reverse_cost; } } /* * add to the new path */ newPath.push_back(pathstop); } path = newPath; }
IMPDOMINO_BEGIN_INTERNAL_NAMESPACE void load_merged_assignments( const Subset &first_subset, AssignmentContainer *first, const Subset &second_subset, AssignmentContainer *second, const SubsetFilterTables &filters, ListSubsetFilterTable *lsft, InferenceStatistics *stats, size_t max_states, AssignmentContainer *out) { base::Pointer<AssignmentContainer> outp(out); IMP::base::PointerMember<AssignmentContainer> firstp(first), secondp(second); IMP_FUNCTION_LOG; EdgeData ed = get_edge_data(first_subset, second_subset, filters); load_union(first_subset, second_subset, first, second, ed, max_states, out); if (stats) stats->add_subset(ed.union_subset, out); if (lsft) update_list_subset_filter_table(lsft, ed.union_subset, out); /*using namespace IMP; IMP_LOG_VERBOSE( "After merge, set is " << merged_subset << " and data is\n" << ret << std::endl);*/ }