Version: 1.0
Public Member Functions | List of all members
BinaryDragStatistics Class Reference

Calculates the statistics of a binary drag with one or multiple roots. More...

#include <drag_statistics.h>

Public Member Functions

 BinaryDragStatistics (const BinaryDrag< conact > &bd)
 The constructor creates the object and directly calculates the statistics. More...
 
auto Nodes () const
 Returns the number of unique nodes inside the DRAG. More...
 
auto Leaves () const
 Returns the number of unique leaves inside the DRAG. More...
 
void PrintLeaves (std::ostream &os=std::cout)
 Reverse into the specified output stream the unique leaves of a BinaryDrag. More...
 

Detailed Description

Calculates the statistics of a binary drag with one or multiple roots.

The statistics are basically the number of unique nodes an unique leaves inside the binary drag. Nodes() and Leaves() member functions allows to access the calculated statistics.

Definition at line 22 of file drag_statistics.h.

Constructor & Destructor Documentation

◆ BinaryDragStatistics()

BinaryDragStatistics::BinaryDragStatistics ( const BinaryDrag< conact > &  bd)
inline

The constructor creates the object and directly calculates the statistics.

Parameters
[in]bdBinaryDrag on which calculate the statistics.

Definition at line 43 of file drag_statistics.h.

Member Function Documentation

◆ Leaves()

auto BinaryDragStatistics::Leaves ( ) const
inline

Returns the number of unique leaves inside the DRAG.

Returns
number of unique leaves

Definition at line 59 of file drag_statistics.h.

◆ Nodes()

auto BinaryDragStatistics::Nodes ( ) const
inline

Returns the number of unique nodes inside the DRAG.

Returns
number of unique nodes

Definition at line 53 of file drag_statistics.h.

◆ PrintLeaves()

void BinaryDragStatistics::PrintLeaves ( std::ostream &  os = std::cout)
inline

Reverse into the specified output stream the unique leaves of a BinaryDrag.

Parameters
[in]osOutput stream where to write the leaves. Default value is std::cout.
Returns

Definition at line 67 of file drag_statistics.h.


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