DGtal
1.5.beta
|
#include <iostream>
#include <sstream>
#include "DGtal/base/Common.h"
#include "DGtal/base/OrderedAlphabet.h"
Go to the source code of this file.
Functions | |
bool | testFLF (const OrderedAlphabet &alphabet, const string &output, const string &input) |
bool | testDuvalPP (const OrderedAlphabet &alphabet, const string &output, const string &input) |
bool | testDuvalPPMod (const OrderedAlphabet &alphabet, const string &output, const string &input, OrderedAlphabet::index_t s) |
bool | testOrderedAlphabet () |
int | main (int argc, char **argv) |
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Functions for testing class OrderedAlphabet.
This file is part of the DGtal library.
Definition in file testOrderedAlphabet.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 188 of file testOrderedAlphabet.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::emphase(), DGtal::Trace::endBlock(), DGtal::Trace::info(), testOrderedAlphabet(), and DGtal::trace.
bool testDuvalPP | ( | const OrderedAlphabet & | alphabet, |
const string & | output, | ||
const string & | input | ||
) |
Checks if Duval++ works.
alphabet | an alphabet. |
input | the input word. |
output | the expected output word as "NC" or "C(w1)^l1" |
Definition at line 88 of file testOrderedAlphabet.cpp.
References DGtal::Trace::beginBlock(), DGtal::OrderedAlphabet::duvalPP(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by testOrderedAlphabet().
bool testDuvalPPMod | ( | const OrderedAlphabet & | alphabet, |
const string & | output, | ||
const string & | input, | ||
OrderedAlphabet::index_t | s | ||
) |
Checks if Duval++ modulo works.
alphabet | an alphabet. |
input | the input word. |
output | the expected output word as "NC" or "C(w1)^l1" |
s | starting index. |
Definition at line 119 of file testOrderedAlphabet.cpp.
References DGtal::Trace::beginBlock(), DGtal::OrderedAlphabet::duvalPPMod(), DGtal::Trace::endBlock(), DGtal::Trace::info(), and DGtal::trace.
Referenced by testOrderedAlphabet().
bool testFLF | ( | const OrderedAlphabet & | alphabet, |
const string & | output, | ||
const string & | input | ||
) |
Checks if the Lyndon factorization works.
alphabet | an alphabet. |
input | the input word. |
output | the expected output word as (w1)^l1...(wn)^ln. |
Definition at line 51 of file testOrderedAlphabet.cpp.
References DGtal::Trace::beginBlock(), DGtal::Trace::endBlock(), DGtal::OrderedAlphabet::firstLyndonFactor(), DGtal::Trace::info(), and DGtal::trace.
Referenced by testOrderedAlphabet().
bool testOrderedAlphabet | ( | ) |
Test the class OrderedAlphabet.
Definition at line 154 of file testOrderedAlphabet.cpp.
References DGtal::Trace::info(), testDuvalPP(), testDuvalPPMod(), testFLF(), and DGtal::trace.
Referenced by main().