Warning, file /include/root/TMVA/BinarySearchTreeNode.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #ifndef ROOT_TMVA_BinarySearchTreeNode
0030 #define ROOT_TMVA_BinarySearchTreeNode
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040 #include <iosfwd>
0041 #include <vector>
0042 #include <string>
0043 #include <sstream>
0044 #include "Rtypes.h"
0045
0046 #include "TMVA/Node.h"
0047
0048 namespace TMVA {
0049
0050 class Event;
0051
0052
0053
0054
0055 class BinarySearchTreeNode : public Node {
0056
0057 public:
0058
0059
0060 BinarySearchTreeNode( const Event* e = nullptr, UInt_t signalClass=0 );
0061
0062
0063 BinarySearchTreeNode( BinarySearchTreeNode* parent, char pos );
0064
0065
0066 BinarySearchTreeNode ( const BinarySearchTreeNode &n,
0067 BinarySearchTreeNode* parent = nullptr);
0068
0069
0070 virtual ~BinarySearchTreeNode ();
0071
0072 Node* CreateNode() const override { return new BinarySearchTreeNode(); }
0073
0074
0075 Bool_t GoesRight( const Event& ) const override;
0076
0077
0078 Bool_t GoesLeft ( const Event& ) const override;
0079
0080
0081 virtual Bool_t EqualsMe ( const Event& ) const;
0082
0083
0084 inline void SetSelector( Short_t i) { fSelector = i; }
0085
0086 inline Short_t GetSelector() const { return fSelector; }
0087
0088 const std::vector<Float_t> & GetEventV() const { return fEventV; }
0089 Float_t GetWeight() const { return fWeight; }
0090 UInt_t GetClass() const { return fClass; }
0091
0092 const std::vector<Float_t> & GetTargets() const { return fTargets; }
0093
0094
0095
0096 void Print( std::ostream& os ) const override;
0097
0098
0099 void PrintRec( std::ostream& os ) const override;
0100
0101 void AddAttributesToNode(void* node) const override;
0102 void AddContentToNode(std::stringstream& s) const override;
0103
0104
0105 Bool_t ReadDataRecord( std::istream& is, UInt_t tmva_Version_Code = TMVA_VERSION_CODE ) override;
0106 void ReadAttributes(void* node, UInt_t tmva_Version_Code = TMVA_VERSION_CODE ) override;
0107 void ReadContent(std::stringstream& s) override;
0108
0109 private:
0110 std::vector<Float_t> fEventV;
0111 std::vector<Float_t> fTargets;
0112
0113 Float_t fWeight;
0114 UInt_t fClass;
0115
0116 Short_t fSelector;
0117
0118 ClassDefOverride(BinarySearchTreeNode,0);
0119 };
0120
0121 }
0122
0123 #endif