OpendTect-6_4  6.4
nladesign.h
Go to the documentation of this file.
1 #ifndef nladesign_h
2 #define nladesign_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: June 2001
10 ________________________________________________________________________
11 
12 -*/
13 
14 #include "nlamod.h"
15 #include "bufstringset.h"
16 
17 
29 {
30 public:
31  NLADesign() { clear(); }
32  ~NLADesign() { clear(); }
33  NLADesign( const NLADesign& sd )
34  { *this = sd; }
35  NLADesign& operator =( const NLADesign& sd )
36  {
37  if ( this != &sd )
38  {
39  deepCopy( inputs, sd.inputs );
40  deepCopy( outputs, sd.outputs );
41  hiddensz = sd.hiddensz;
42  classification = sd.classification;
43  }
44  return *this;
45  }
46 
47  inline void clear()
48  {
49  deepErase(inputs); deepErase(outputs);
50  hiddensz = 0; classification = false;
51  }
52  inline bool isSupervised() const
53  { return outputs.size(); }
54 
55  static inline int finalNrHiddenNodes( int usrsz, int nrinp )
56  {
57  if ( usrsz < 1 || mIsUdf(usrsz) )
58  {
59  usrsz = nrinp / 2;
60  if ( usrsz < 1 )
61  usrsz = 1;
62  }
63  return usrsz;
64  }
65 
68  int hiddensz;
70 
71 };
72 
73 
74 #endif
#define mExpClass(module)
Definition: commondefs.h:160
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:287
BufferStringSet inputs
Definition: nladesign.h:66
bool classification
Definition: nladesign.h:69
Simple description of NLA design, viewed from user&#39;s perspective.
Definition: nladesign.h:28
bool isSupervised() const
Definition: nladesign.h:52
void clear(std::ios &)
Set of BufferString objects.
Definition: bufstringset.h:28
int hiddensz
Definition: nladesign.h:68
static int finalNrHiddenNodes(int usrsz, int nrinp)
Definition: nladesign.h:55
~NLADesign()
Definition: nladesign.h:32
void deepCopy(ObjectSet< T > &to, const ObjectSet< S > &from)
fill an ObjectSet with copies of the objects in the other set.
Definition: objectset.h:147
BufferStringSet outputs
Definition: nladesign.h:67
NLADesign()
Definition: nladesign.h:31
void clear()
Definition: nladesign.h:47
NLADesign(const NLADesign &sd)
Definition: nladesign.h:33
void deepErase(ObjectSet< T > &os)
empty the ObjectSet deleting all objects pointed to.
Definition: objectset.h:118

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019