Version: 1.0
Classes | Typedefs | Enumerations | Functions
hypercube.h File Reference
#include <algorithm>
#include <cassert>
#include <iostream>
#include "conact_tree.h"
#include "rule_set.h"

Go to the source code of this file.

Classes

struct  VIndex
 
struct  VNode
 
struct  VHyperCube
 

Typedefs

typedef unsigned char byte
 

Enumerations

enum  VDim { Zero = 0 , One = 1 , Indifference = 2 }
 

Functions

template<typename T >
std::istream & rawread (std::istream &is, T &val, size_t n)
 
template<typename T >
std::ostream & rawwrite (std::ostream &os, const T &val, size_t n)
 
BinaryDrag< conactGenerateOdt (const rule_set &rs)
 
BinaryDrag< conactGenerateOdt (const rule_set &rs, const std::string &filename)
 
BinaryDrag< conactGetOdt (const rule_set &rs, bool force_generation=false)
 Returns the optimal (or pseudo optimal) decision tree generated from the given rule set. More...
 
BinaryDrag< conactGetOdtWithFileSuffix (const rule_set &rs, const std::string &file_suffix, bool force_generation=false)
 Returns the optimal (or pseudo optimal) decision tree generated from the given rule set. More...
 

Typedef Documentation

◆ byte

typedef unsigned char byte

Definition at line 17 of file hypercube.h.

Enumeration Type Documentation

◆ VDim

enum VDim
Enumerator
Zero 
One 
Indifference 

Definition at line 20 of file hypercube.h.

Function Documentation

◆ GenerateOdt() [1/2]

BinaryDrag<conact> GenerateOdt ( const rule_set rs)

Definition at line 179 of file hypercube.cpp.

◆ GenerateOdt() [2/2]

BinaryDrag<conact> GenerateOdt ( const rule_set rs,
const std::string &  filename 
)

◆ GetOdt()

BinaryDrag<conact> GetOdt ( const rule_set rs,
bool  force_generation = false 
)

Returns the optimal (or pseudo optimal) decision tree generated from the given rule set.

This function generates the optimal decision tree from the given rule set. When the number of rules is too high, a pseudo optimal tree is generated. If the tree has already been generated, it is loaded from file, unless the "force_generation" parameter is set to true. In this case the tree is always regenerated. The loaded/generated tree is then returned from the function.

Parameters
[in]rsRule set from which generate the decision tree.
[in]force_generationWhether the tree must be generated or can be loaded from file.
Returns
The optimal decision tree associated to the specified rule set.

Definition at line 198 of file hypercube.cpp.

◆ GetOdtWithFileSuffix()

BinaryDrag<conact> GetOdtWithFileSuffix ( const rule_set rs,
const std::string &  file_suffix,
bool  force_generation = false 
)

Returns the optimal (or pseudo optimal) decision tree generated from the given rule set.

This function generates the optimal decision tree from the given rule set. When the number of rules is too high, a pseudo optimal tree is generated. If the tree has already been generated, it is loaded from file, unless the "force_generation" parameter is set to true. In this case the tree is always regenerated. The loaded/generated tree is then returned from the function.

Parameters
[in]rsRule set from which generate the decision tree.
[in]file_suffixSuffix that is appended to the file name of the decision tree file.
[in]force_generationWhether the tree must be generated or can be loaded from file.
Returns
The optimal decision tree associated to the specified rule set.

◆ rawread()

template<typename T >
std::istream& rawread ( std::istream &  is,
T &  val,
size_t  n 
)

Definition at line 103 of file hypercube.h.

◆ rawwrite()

template<typename T >
std::ostream& rawwrite ( std::ostream &  os,
const T &  val,
size_t  n 
)

Definition at line 107 of file hypercube.h.