IntensityGraph.h
Go to the documentation of this file.
1 // *****************************************************************
2 // Filename: IntensityGraph.h
3 // Copyright: Kai Welke, Chair Prof. Dillmann (IAIM),
4 // Institute for Computer Science and Engineering (CSE),
5 // University of Karlsruhe. All rights reserved.
6 // Author: Kai Welke
7 // Date: 12.06.2008
8 // *****************************************************************
9 
10 #pragma once
11 
12 // *****************************************************************
13 // includes
14 // *****************************************************************
15 #include "SphericalGraph.h"
16 #include <string>
17 
18 
19 // *****************************************************************
20 // structures
21 // *****************************************************************
22 // *****************************************************************
23 // definition of nodes
24 // *****************************************************************
25 class CIntensityNode : public CSGNode
26 {
27 public:
30  ~CIntensityNode() override;
31 
32  void setIntensity(float fIntensity);
33  float getIntensity();
34 
35  CSGNode* clone() override
36  {
38  copy->setIndex(m_nIndex);
39  copy->setIntensity(m_fIntensity);
40  return copy;
41  }
42 
43 private:
44  float m_fIntensity;
45 };
46 
47 
48 // *****************************************************************
49 // definition of sensory egosphere
50 // *****************************************************************
52 {
53 public:
55  CIntensityGraph(const CIntensityGraph& prototype);
56  //CIntensityGraph(int nNumberNodes);
57  CIntensityGraph(std::string sFileName);
58  ~CIntensityGraph() override;
59 
60  void reset();
61  void set(float fIntensity);
62 
63 
64  void graphToVec(std::vector<float>& vec);
65 
66  ///////////////////////////////
67  // file io
68  ///////////////////////////////
69  bool read(std::istream& infile) override;
70  bool readNode(std::istream& infile) override;
71  bool readEdge(std::istream& infile) override;
72 
73  bool write(std::ostream& outfile) override;
74  bool writeNode(std::ostream& outfile, int n) override;
75  bool writeEdge(std::ostream& outfile, int e) override;
76 
77 
78  // inherited
80  {
81  return new CIntensityNode();
82  }
83 
84  ///////////////////////////////
85  // operators
86  ///////////////////////////////
88 
89 };
90 
CIntensityGraph::operator=
CIntensityGraph & operator=(CIntensityGraph const &rhs)
Definition: IntensityGraph.cpp:101
CIntensityGraph::reset
void reset()
Definition: IntensityGraph.cpp:110
CIntensityNode
Definition: IntensityGraph.h:25
CIntensityGraph::set
void set(float fIntensity)
Definition: IntensityGraph.cpp:115
CIntensityGraph::writeNode
bool writeNode(std::ostream &outfile, int n) override
Definition: IntensityGraph.cpp:238
CSGNode::m_nIndex
int m_nIndex
Definition: SphericalGraph.h:80
CIntensityNode::clone
CSGNode * clone() override
Definition: IntensityGraph.h:35
SphericalGraph.h
CIntensityNode::CIntensityNode
CIntensityNode()
Definition: IntensityGraph.cpp:24
CSGNode::m_Position
TSphereCoord m_Position
Definition: SphericalGraph.h:79
CIntensityGraph::CIntensityGraph
CIntensityGraph()
Definition: IntensityGraph.cpp:58
CSGNode
Definition: SphericalGraph.h:43
CIntensityGraph
Definition: IntensityGraph.h:51
copy
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this and transmit the and to prepare derivative works of the and to permit third parties to whom the Software is furnished to do all subject to the including the above license this restriction and the following must be included in all copies of the in whole or in and all derivative works of the unless such copies or derivative works are solely in the form of machine executable object code generated by a source language processor THE SOFTWARE IS PROVIDED AS WITHOUT WARRANTY OF ANY EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF FITNESS FOR A PARTICULAR TITLE AND NON INFRINGEMENT IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN TORT OR ARISING OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE The MIT Marcin Kalicinski Permission is hereby free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to copy
Definition: license.txt:39
CIntensityGraph::writeEdge
bool writeEdge(std::ostream &outfile, int e) override
Definition: IntensityGraph.cpp:251
CIntensityGraph::read
bool read(std::istream &infile) override
Definition: IntensityGraph.cpp:129
CIntensityGraph::write
bool write(std::ostream &outfile) override
Definition: IntensityGraph.cpp:205
CIntensityNode::getIntensity
float getIntensity()
Definition: IntensityGraph.cpp:47
CIntensityGraph::readEdge
bool readEdge(std::istream &infile) override
Definition: IntensityGraph.cpp:190
CIntensityNode::~CIntensityNode
~CIntensityNode() override
CIntensityNode::setIntensity
void setIntensity(float fIntensity)
Definition: IntensityGraph.cpp:42
CIntensityGraph::~CIntensityGraph
~CIntensityGraph() override
CSphericalGraph
Definition: SphericalGraph.h:93
TSphereCoord
Definition: Structs.h:22
CIntensityGraph::readNode
bool readNode(std::istream &infile) override
Definition: IntensityGraph.cpp:163
CIntensityGraph::getNewNode
CIntensityNode * getNewNode() override
Definition: IntensityGraph.h:79
CIntensityGraph::graphToVec
void graphToVec(std::vector< float > &vec)
Definition: IntensityGraph.cpp:264