LAL: Linear Arrangement Library 21.07.01
A library focused on algorithms on linear arrangements of graphs.
Loading...
Searching...
No Matches
lal::io::_process_treebank_base Class Reference

The processor base class. More...

#include <process_treebank_base.hpp>

Inheritance diagram for lal::io::_process_treebank_base:
lal::io::treebank_collection_processor lal::io::treebank_processor

Public Member Functions

void add_feature (const treebank_feature &fs) noexcept
 Adds a feature to the processor.
 
void remove_feature (const treebank_feature &fs) noexcept
 Removes a feature from the processor.
 
void set_check_before_process (bool v) noexcept
 Should the treebank file or collection be checked for errors prior to processing?
 
void clear_features () noexcept
 Clear the features in the processor.
 
void set_separator (char c) noexcept
 Sets the separator character.
 
void set_verbosity (int k) noexcept
 Sets the level of verbosity of the process methods.
 
void set_output_header (bool h) noexcept
 Output a hedaer for the treebank result file.
 
bool has_feature (const treebank_feature &fs) const noexcept
 Is a given feature to be calculated?
 

Protected Attributes

std::array< bool, __treebank_feature_sizem_what_fs
 The list of features to be computed.
 
bool m_check_before_process = true
 Process the treebank file or collection prior to processing.
 
char m_separator = '\t'
 Character used as separator.
 
bool m_output_header = true
 Output a header for each file.
 
int m_be_verbose = 0
 The verbosity of the processor.
 

Detailed Description

The processor base class.

Users should refrain from using this class. This class acts as a base class for all processor classes, namely, the lal::io::treebank_processor and the lal::io::treebank_collection_processor.

Member Function Documentation

◆ add_feature()

void lal::io::_process_treebank_base::add_feature ( const treebank_feature & fs)
inlinenoexcept

Adds a feature to the processor.

Parameters
fsFeature to be added.

◆ has_feature()

bool lal::io::_process_treebank_base::has_feature ( const treebank_feature & fs) const
inlinenoexcept

Is a given feature to be calculated?

Parameters
fsThe feature being queried.
Returns
True or False depending on whether the feature was added or removed.

◆ remove_feature()

void lal::io::_process_treebank_base::remove_feature ( const treebank_feature & fs)
inlinenoexcept

Removes a feature from the processor.

Parameters
fsFeature to be removed.

◆ set_output_header()

void lal::io::_process_treebank_base::set_output_header ( bool h)
inlinenoexcept

Output a hedaer for the treebank result file.

Default is true.

Parameters
hOutput header or not.

◆ set_separator()

void lal::io::_process_treebank_base::set_separator ( char c)
inlinenoexcept

Sets the separator character.

The default seprator is a tabulator character '\t'.

Parameters
cThe separator character.

◆ set_verbosity()

void lal::io::_process_treebank_base::set_verbosity ( int k)
inlinenoexcept

Sets the level of verbosity of the process methods.

Default is 0 (i.e., no verbosity at all). Verbosity is classified by levels:

  • Level 1: outputs progress messages.
  • Level 2: outputs error messages.
    Parameters
    kVerbosity level.

Member Data Documentation

◆ m_be_verbose

int lal::io::_process_treebank_base::m_be_verbose = 0
protected

The verbosity of the processor.

When set to a value greater than or equal to 1, method process will output progress messages.


The documentation for this class was generated from the following file: