VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
prbStepFunction.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <vlutil/vlMachineTypes.h>
15 #include <readerWriter/rwList.h>
16 #include <readerWriter/rwBoolean.h>
17 
18 class DtString;
20 class DtPrbValueList;
21 
22 
25 {
26 public:
27 
30 
32  DtPrbStepFunction(const DtString& name,
33  DtReaderWriterRegistry* parentRegistry = NULL);
34  DtPrbStepFunction(const DtSymbolString& name,
35  DtReaderWriterRegistry* parentRegistry = NULL);
36 
38  DtPrbStepFunction(const DtString& name, const
40  parentRegistry = NULL);
41  DtPrbStepFunction(const DtSymbolString& name, const
43  parentRegistry = NULL);
44 
45  const DtPrbStepFunction& operator=(const
46  DtPrbStepFunction& orig);
47 
49  virtual ~DtPrbStepFunction();
50 
51  virtual DtPrbStepFunction* clone(const DtString& name,
52  DtReaderWriterRegistry* parentRegistry = NULL) const;
53  virtual DtPrbStepFunction* clone(const DtSymbolString& name,
54  DtReaderWriterRegistry* parentRegistry = NULL) const;
55 
57  virtual int addTableEntry(const DtPrbValueList& tableEntry);
58 
64  virtual bool getProbabilities(DtReal value, DtPrbValueList* entry) const;
65 
68  virtual double minInputValue() const;
69 
72  virtual double maxInputValue() const;
73 
75  virtual double solveForMaximum() const;
76 
78  virtual bool isValid() const;
79 
80  bool operator==(const DtPrbStepFunction&) const;
81  bool operator!=(const DtPrbStepFunction& rhs) const
82  {
83  return !(*this == rhs);
84  }
85 
87  virtual bool removeValue(double);
88 
90  virtual double value(int index) const;
91 
94  virtual DtPrbValueList* changeValue(double oldValue, double newValue, int* newColumn = 0);
95 
97  virtual DtPrbValueList* changeValueForColumn(int col, double newRange, int* newColumn = 0);
98 
100  virtual DtListItem* lookupValue(double value) const;
101 
103  virtual int indexOfValue(double) const;
104 
107  virtual void setRoundDown(bool);
108  bool roundDown() const
109  {
110  return myRoundDown;
111  }
113 
115  virtual DtPrbValueList* changeValue(DtListItem* item, double newValue, int* newColumn = 0);
116 
119  void emptyList();
120 
123  void copyList(const DtPrbStepFunction & orig);
124 
125  virtual int addTableEntry(DtPrbValueList * tableEntry);
126 
130  virtual const char* readerWriterType() const;
131 
133  static const char* theXmlType();
134 
135  virtual const char* xmlType() const
136  {
137  return theXmlType();
138  }
139 
140 protected:
142  virtual void prePutSelf();
143  virtual void postPutSelf();
144 
146  virtual DtlObjPtr getData(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths,
147  const DtVariableBindingsList& variableBindings);
148 
149 protected:
152 };
153 
154 
155 
156 
157 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)