OpendTect  6.3
nladesign.h
Go to the documentation of this file.
1 #pragma once
2 
3 /*+
4 ________________________________________________________________________
5 
6  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
7  Author: A.H. Bril
8  Date: June 2001
9 ________________________________________________________________________
10 
11 -*/
12 
13 #include "nlamod.h"
14 #include "bufstringset.h"
15 
16 
28 {
29 public:
30  NLADesign() { clear(); }
31  ~NLADesign() { clear(); }
32  NLADesign( const NLADesign& sd )
33  { *this = sd; }
34  NLADesign& operator =( const NLADesign& sd )
35  {
36  if ( this != &sd )
37  {
38  inputs = sd.inputs;
39  outputs = sd.outputs;
40  hiddensz = sd.hiddensz;
41  classification = sd.classification;
42  }
43  return *this;
44  }
45 
46  inline void clear()
47  {
48  inputs.setEmpty(); outputs.setEmpty();
49  hiddensz = 0; classification = false;
50  }
51  inline bool isSupervised() const
52  { return !outputs.isEmpty(); }
53 
54  static inline int finalNrHiddenNodes( int usrsz, int nrinp )
55  {
56  if ( usrsz < 1 || mIsUdf(usrsz) )
57  {
58  usrsz = nrinp / 2;
59  if ( usrsz < 1 )
60  usrsz = 1;
61  }
62  return usrsz;
63  }
64 
67  int hiddensz;
69 
70 };
#define mExpClass(module)
Definition: commondefs.h:157
#define mIsUdf(val)
Use mIsUdf to check for undefinedness of simple types.
Definition: undefval.h:285
BufferStringSet inputs
Definition: nladesign.h:65
bool classification
Definition: nladesign.h:68
Simple description of NLA design, viewed from user&#39;s perspective.
Definition: nladesign.h:27
bool isSupervised() const
Definition: nladesign.h:51
void clear(std::ios &)
Set of BufferString objects.
Definition: bufstringset.h:25
int hiddensz
Definition: nladesign.h:67
static int finalNrHiddenNodes(int usrsz, int nrinp)
Definition: nladesign.h:54
~NLADesign()
Definition: nladesign.h:31
BufferStringSet outputs
Definition: nladesign.h:66
NLADesign()
Definition: nladesign.h:30
void clear()
Definition: nladesign.h:46
NLADesign(const NLADesign &sd)
Definition: nladesign.h:32

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