Samchon Framework for CPP
1.0.0
|
Criteria, a conditional expression with weight. More...
#include <NTCriteria.hpp>
Public Member Functions | |
virtual void | construct (std::shared_ptr< library::XML >) override |
Construct data of the Entity from an XML object. More... | |
virtual auto | TAG () const -> std::string override |
A tag name when represented by XML. More... | |
virtual auto | CHILD_TAG () const -> std::string override |
A tag name of children. More... | |
virtual auto | toXML () const -> std::shared_ptr< library::XML > override |
Get an XML object represents the EntityGroup. More... | |
![]() | |
EntityGroup () | |
Default Constructor. More... | |
auto | has (const std::string &key) const -> bool |
Indicates whether a container has an object having the specified identifier. More... | |
auto | get (const std::string &key) -> value_type & |
Access the element by specified identifier(key). More... | |
auto | get (const std::string &key) const -> const value_type & |
Access the const element by specified identifier(key). More... | |
![]() | |
Entity () | |
Default Constructor. More... | |
virtual auto | key () const -> std::string |
Get a key that can identify the Entity uniquely. More... | |
![]() | |
IEntityGroup () | |
Default Constructor. More... | |
Protected Member Functions | |
virtual auto | createChild (std::shared_ptr< library::XML >) -> NTCriteria *override |
Factory method of a child Entity. More... | |
Criteria, a conditional expression with weight.
NTCriteria is an object realizing ANN(Artificial Neural Network).
You can make the ANN model having weight and bias.
A conditional expression with weight
F(x) = (NTSide < NTSide ? 1: 0) X weight
NTCrietria is made up for conditional expression.
Hierarchical relationship
With that rule, you can make enormous conditions. I can sure there's not any condition can'be be expressed by the model.
Making bias
Just make a NTCriteria returns only true.
It's the bias returns only weight.
Exporing in a NTCriteria (optimize a side)
Make a NTSide to be nullptr, then NTCriteria will explore the best value.
Nam-Tree will calculate the condtions from minimum to maximum in INTExplore reach to the precision, by the method of multi-demensional grid.
Exploring parameter in NTSide
If you set the parameterMNap to be empty, Nam-Tree will explore the best parameter until reach to the precision in INTExploreParameter from minimum to maximum.
Exploring by creating NTCriteria
(Creates lots of hierarchical conditions and tests them)
If all the side (left and right) in a NTCriteria are nullptr, the NTCriteria will make a lot of children NTCriteria(s) to test lots of cases, so that derives the best condition set will be made up.
This process will ride on same routines of 4-1 and 4-2, for each created cases. Of course, this process needs too much time, so that you may need to be patient.
Definition at line 77 of file NTCriteria.hpp.
|
overridevirtual |
Construct data of the Entity from an XML object.
Constructs the EntityGroup's own member variables only from the input XML object.
Do not consider about constructing children Entity objects' data in EntityGroup::construct(). Those children Entity objects' data will constructed by their own construct() method. Even insertion of XML objects representing children are done by abstract method of EntityGroup::toXML().
Constructs only data of EntityGroup's own.
Reimplemented from samchon::protocol::EntityGroup< _Container, _ETy, T >.
Definition at line 34 of file NTCriteria.cpp.
|
overrideprotectedvirtual |
Factory method of a child Entity.
EntityGroup::createChild() is a factory method creating a new child Entity which is belonged to the EntityGroup. This method is called by EntityGroup::construct(). The children construction methods Entity::construct() will be called by abstract method of the EntityGroup::construct().
Implements samchon::protocol::EntityGroup< _Container, _ETy, T >.
Definition at line 44 of file NTCriteria.cpp.
References samchon::namtree::NTFactory::createCriteria().
|
overridevirtual |
A tag name when represented by XML.
Implements samchon::protocol::Entity.
Definition at line 16 of file NTCriteria.cpp.
|
overridevirtual |
A tag name of children.
< TAG>
<CHILD_TAG />
<CHILD_TAG />
</TAG>
Implements samchon::protocol::IEntityGroup.
Definition at line 17 of file NTCriteria.cpp.
|
overridevirtual |
Get an XML object represents the EntityGroup.
Archives the EntityGroup's own member variables only to the returned XML object.
Do not consider about archiving children Entity objects' data in EntityGroup::toXML(). Those children Entity objects will converted to XML object by their own toXML() method. The insertion of XML objects representing children are done by abstract method of EntityGroup::toXML().
Archives only data of EntityGroup's own.
Reimplemented from samchon::protocol::EntityGroup< _Container, _ETy, T >.
Definition at line 70 of file NTCriteria.cpp.