diff options
| author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-04-02 23:49:30 -0400 | 
|---|---|---|
| committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-04-02 23:49:30 -0400 | 
| commit | 2bd8136c89cf39d828087d38034eef72190dda08 (patch) | |
| tree | 44223ae8a6e32758643cf5d0d0cc6811eda47d22 /rst_parser/arc_factored.cc | |
| parent | bf4a7606151301dba49265e91c289f2caab2b7ec (diff) | |
make sure i don't break build by adding RST parser stubs
Diffstat (limited to 'rst_parser/arc_factored.cc')
| -rw-r--r-- | rst_parser/arc_factored.cc | 31 | 
1 files changed, 31 insertions, 0 deletions
| diff --git a/rst_parser/arc_factored.cc b/rst_parser/arc_factored.cc new file mode 100644 index 00000000..1e75600b --- /dev/null +++ b/rst_parser/arc_factored.cc @@ -0,0 +1,31 @@ +#include "arc_factored.h" + +#include <set> + +#include <boost/pending/disjoint_sets.hpp> + +using namespace std; +using namespace boost; + +// based on Trajan 1977 +void ArcFactoredForest::MaximumSpanningTree(SpanningTree* st) const { +  typedef disjoint_sets_with_storage<identity_property_map, identity_property_map, +      find_with_full_path_compression> DisjointSet; +  DisjointSet strongly(num_words_ + 1); +  DisjointSet weakly(num_words_ + 1); +  set<unsigned> roots, h, rset; +  vector<pair<short, short> > enter(num_words_ + 1); +  for (unsigned i = 0; i <= num_words_; ++i) { +    strongly.make_set(i); +    weakly.make_set(i); +    roots.insert(i); +  } +  while(!roots.empty()) { +    set<unsigned>::iterator it = roots.begin(); +    const unsigned k = *it; +    roots.erase(it); +    cerr << "k=" << k << endl; +    pair<short,short> ij; // TODO = Max(k); +  } +} + | 
