00001 // Search graph helper functions -*- C++ -*- 00002 00003 // $Id: sparsity.h 411 2008-02-29 13:05:41Z mihaly $ 00004 // Copyright (C) 2001-2008 Hermann Schichl, Mihaly Csaba Markot 00005 // 00006 // This file is a COCONUT inference engine. This library 00007 // is free software; you can redistribute it and/or modify it under the 00008 // terms of the Library GNU General Public License as published by the 00009 // Free Software Foundation; either version 2, or (at your option) 00010 // any later version. 00011 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // Library GNU General Public License for more details. 00016 00017 // As a special exception, you may use this file as part of a free software 00018 // library without restriction. Specifically, if other files instantiate 00019 // templates or use macros or inline functions from this file, or you compile 00020 // this file and link it with other files to produce an executable, this 00021 // file does not by itself cause the resulting executable to be covered by 00022 // the Library GNU General Public License. This exception does not however 00023 // invalidate any other reasons why the executable file might be covered by 00024 // the Library GNU General Public License. 00025 00028 #ifndef _SEARCH_GRAPH_FUNCS_H_ 00029 #define _SEARCH_GRAPH_FUNCS_H_ 00030 00031 #include <search_graph.h> 00032 00033 namespace coco { 00034 00035 typedef std::pair<vdbl::rowid, search_node_id> si_ri_pair; 00036 00037 void get_ids(const std::vector<si_ri_pair>& riv, 00038 std::vector<search_node_id>& v); 00039 00041 00043 void get_leaves_vector(const search_graph& __sgraph, 00044 std::vector<si_ri_pair>& v, 00045 search_inspector *sfoc = NULL); 00046 00047 bool get_children_vector(const search_graph& __sgraph, 00048 const search_node_id& pid, 00049 std::vector<si_ri_pair>& v, 00050 search_inspector *sfoc = NULL); 00051 } // namespace coco 00052 00053 #endif /* _SEARCH_GRAPH_FUNCS_H_ */