OpenWalnut  1.5.0dev
Public Member Functions | Protected Attributes | Friends | List of all members
WReaderClustering Class Reference

Reads a hierarchical clustering from a FDG file. More...

#include <WReaderClustering.h>

+ Inheritance diagram for WReaderClustering:
+ Collaboration diagram for WReaderClustering:

Public Member Functions

 WReaderClustering (std::string fname)
 Constructs and makes a new FDG reader for separate thread start. More...
 
virtual ~WReaderClustering () throw ()
 Destroys this instance and closes the file. More...
 
virtual std::shared_ptr< WDataSetHierarchicalClusteringread ()
 Reads the clustering file and creates a dataset out of it. More...
 
- Public Member Functions inherited from WReader
 WReader (std::string fname)
 Creates a read object for file reading. More...
 
OW_API_DEPRECATED void setFileName (std::string fname)
 Reset the file name and checks if it exists. More...
 
void setFilename (std::string fname)
 Reset the file name and checks if it exists. More...
 

Protected Attributes

std::map< size_t, WFiberCluster::SPtrm_clustering
 Stores the hierarchical clustering map. More...
 
std::map< size_t, WTreeNode::SPtrm_nodes
 Stores the hierarchical clustering map. More...
 
std::vector< std::string > m_lines
 The lines of the fdg file. More...
 
std::shared_ptr< size_t > m_level
 The current hierarchy level the reader is reading. More...
 
- Protected Attributes inherited from WReader
std::string m_fname
 Absolute path of the file to read from. More...
 

Friends

class WReaderClusteringTest
 Only UnitTests may be friends. More...
 

Detailed Description

Reads a hierarchical clustering from a FDG file.

Definition at line 48 of file WReaderClustering.h.

Constructor & Destructor Documentation

◆ WReaderClustering()

WReaderClustering::WReaderClustering ( std::string  fname)
explicit

Constructs and makes a new FDG reader for separate thread start.

Parameters
fnameFile name where to read data from
Exceptions
WDHNoSuchFile

Definition at line 47 of file WReaderClustering.cpp.

◆ ~WReaderClustering()

WReaderClustering::~WReaderClustering ( )
throw (
)
virtual

Destroys this instance and closes the file.

Definition at line 52 of file WReaderClustering.cpp.

Member Function Documentation

◆ read()

std::shared_ptr< WDataSetHierarchicalClustering > WReaderClustering::read ( )
virtual

Reads the clustering file and creates a dataset out of it.

Returns
Reference to the dataset.

Definition at line 57 of file WReaderClustering.cpp.

References m_clustering, WReader::m_fname, and m_nodes.

Friends And Related Function Documentation

◆ WReaderClusteringTest

friend class WReaderClusteringTest
friend

Only UnitTests may be friends.

Definition at line 53 of file WReaderClustering.h.

Member Data Documentation

◆ m_clustering

std::map< size_t, WFiberCluster::SPtr > WReaderClustering::m_clustering
protected

Stores the hierarchical clustering map.

Definition at line 79 of file WReaderClustering.h.

Referenced by read().

◆ m_level

std::shared_ptr<size_t> WReaderClustering::m_level
protected

The current hierarchy level the reader is reading.

Definition at line 94 of file WReaderClustering.h.

◆ m_lines

std::vector< std::string > WReaderClustering::m_lines
protected

The lines of the fdg file.

Definition at line 89 of file WReaderClustering.h.

◆ m_nodes

std::map< size_t, WTreeNode::SPtr > WReaderClustering::m_nodes
protected

Stores the hierarchical clustering map.

Definition at line 84 of file WReaderClustering.h.

Referenced by read().


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