-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnode.h
More file actions
executable file
·40 lines (35 loc) · 738 Bytes
/
Copy pathnode.h
File metadata and controls
executable file
·40 lines (35 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef NODE_H
#define NODE_H
#include <vector>
#include <string>
#ifndef PI
#define PI 3.14159265358979
#endif
using namespace std;
#ifndef st_type
#define st_type
typedef vector<double> state_type;
#endif
class Node {
public:
double t;
double x;
double v;
double theta;
double w;
double u;
double cost;
vector<double> times;
vector<state_type> trajectory;
Node* parent;
vector<Node*> children;
vector<Node*> subnodes;
string print();
void print_node();
void add_child(Node* n);
Node();
Node(Node* n); // Copy constructor
Node(double t, double x, double v, double theta, double w, double u, double cost, Node* parent, vector<double> times, vector<state_type> trajectory);
~Node();
};
#endif