Skip to content

Commit

Permalink
Adjusted to new CST interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
simongog committed Mar 11, 2013
1 parent 6905215 commit 99e587b
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/64bit_array2int_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using namespace sdsl;
using namespace std;

int main(int argc, char *argv[]){
size_t x = util::get_file_size(argv[1]);
size_t x = util::file_size(argv[1]);
const int BPI=8;
cout<<"file size in bytes = "<<x<<endl;
if ( x % BPI != 0 ){
Expand Down
2 changes: 1 addition & 1 deletion examples/bit_vector.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <sdsl/int_vector.hpp>
#include <sdsl/suffixtrees.hpp>
#include <sdsl/suffix_trees.hpp>
#include <iostream>

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion examples/cst_bfs_iterator.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <string>
#include <sdsl/util.hpp>
#include <sdsl/suffixtrees.hpp>
#include <sdsl/suffix_trees.hpp>

using namespace std;
using namespace sdsl;
Expand Down
2 changes: 1 addition & 1 deletion examples/hugepages.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <sdsl/int_vector.hpp>
#include <sdsl/suffixtrees.hpp>
#include <sdsl/suffix_trees.hpp>
#include <sdsl/wt_rlmn.hpp>
#include <sdsl/testutils.hpp>
#include <sdsl/bit_vector_interleaved.hpp>
Expand Down
2 changes: 1 addition & 1 deletion examples/louds_tree.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <iostream>
#include <string>
#include <sdsl/util.hpp>
#include <sdsl/suffixtrees.hpp>
#include <sdsl/suffix_trees.hpp>
#include <sdsl/louds_tree.hpp>

using namespace std;
Expand Down
2 changes: 1 addition & 1 deletion examples/text_statistics.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <sdsl/suffixtrees.hpp>
#include <sdsl/suffix_trees.hpp>
#include <iostream>

using namespace std;
Expand Down
1 change: 1 addition & 0 deletions include/sdsl/csa_wt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#endif

#include "wt_huff.hpp"
#include "suffix_array_helper.hpp"
#include "algorithms.hpp"
#include "iterators.hpp"
#include "util.hpp"
Expand Down
2 changes: 1 addition & 1 deletion include/sdsl/louds_tree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class louds_tree
//! Constructor for a cst and a root node for the traversal
template<class Cst, class CstBfsIterator>
louds_tree(const Cst& cst, const CstBfsIterator begin, const CstBfsIterator end):m_bv(), m_bv_select1(), m_bv_select0(), bv(m_bv) {
bit_vector tmp_bv(4*cst.leaves_in_the_subtree(*begin) , 0); // resize the bit_vector to the maximal
bit_vector tmp_bv(4*cst.size(*begin) , 0); // resize the bit_vector to the maximal
// possible size 2*2*#leaves in the tree
size_type pos = 0;
for (CstBfsIterator it = begin; it != end;) {
Expand Down
2 changes: 1 addition & 1 deletion test/CstByteTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ TYPED_TEST(CstByteTest, BasicMethods) {
typedef typename TypeParam::node_type node_type;
node_type r = cst.root(); // get root node
// Size of the subtree rooted at r should the size of the suffix array
ASSERT_EQ(cst.csa.size(), cst.leaves_in_the_subtree(r));
ASSERT_EQ(cst.csa.size(), cst.size(r));
// Check leaf methods
for (size_type i=0; i < cst.csa.size(); ++i) {
ASSERT_EQ(true, cst.is_leaf(cst.select_leaf(i+1)));
Expand Down
2 changes: 1 addition & 1 deletion test/CstIntTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ TYPED_TEST(CstIntTest, BasicMethods) {
typedef typename TypeParam::node_type node_type;
node_type r = cst.root(); // get root node
// Size of the subtree rooted at r should the size of the suffix array
ASSERT_EQ(cst.csa.size(), cst.leaves_in_the_subtree(r));
ASSERT_EQ(cst.csa.size(), cst.size(r));
// Check leaf methods
for (size_type i=0; i < cst.csa.size(); ++i) {
ASSERT_EQ(true, cst.is_leaf(cst.select_leaf(i+1)));
Expand Down

0 comments on commit 99e587b

Please sign in to comment.