Node.cpp 1.52 KB
Newer Older
1
// Copyright 2021 Thomas A. R. Purcell
2
//
3
4
5
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
6
//
7
//     http://www.apache.org/licenses/LICENSE-2.0
8
//
9
10
11
12
13
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
14
15
16
17
18
19
20
21
22
23
24
25

/** @file feature_creation/node/Node.cpp
 *  @brief Implements the base class for the objects that represent features
 *
 *  @author Thomas A. R. Purcell (tpurcell90)
 *  @bug No known bugs.
 *
 *  This package represents the features in SISSO as a binary expression tree and are accessible from the root node of that tree.
 *  The node class are the vertices of the tree and represent initial features (FeatureNode) and all algebraic operators (OperatorNodes).
 *  The edges are the represented via the _feats member in OperatorNode that store the features the operation acts on (its children).
 */

Thomas Purcell's avatar
Thomas Purcell committed
26
#include "feature_creation/node/Node.hpp"
Thomas Purcell's avatar
Thomas Purcell committed
27

Thomas Purcell's avatar
Thomas Purcell committed
28
29
30
Node::Node()
{}

Thomas Purcell's avatar
Thomas Purcell committed
31
32
Node::Node(const unsigned long int feat_ind, const int n_samp, const int n_samp_test) :
    _n_samp_test(n_samp_test),
Thomas Purcell's avatar
Thomas Purcell committed
33
    _n_samp(n_samp),
34
    _feat_ind(feat_ind),
35
36
37
    _arr_ind(feat_ind),
    _d_mat_ind(-1),
    _selected(false)
Thomas Purcell's avatar
Thomas Purcell committed
38
39
{}

Thomas Purcell's avatar
Thomas Purcell committed
40
Node::~Node()
41
42
{}

Thomas Purcell's avatar
Thomas Purcell committed
43
BOOST_SERIALIZATION_ASSUME_ABSTRACT(Node)
Thomas Purcell's avatar
Thomas Purcell committed
44