Go to the documentation of this file.
16 neighbors.push_back(nodeID+1);
18 neighbors.push_back(nodeID+
d);
19 if (((nodeID%
d) <
d-1) && ((nodeID/
d) <
d-1))
20 neighbors.push_back(nodeID+
d+1);
29 if (((nodeID%
d) <
d-1) && ((nodeID/
d) <
d-1))
43 case -3: s=s-
d;
break;
44 case -2: s=s-
d-1;
break;
45 case -1: s=s-1;
break;
47 case 2: s=s+
d+1;
break;
49 default: assert(
false);
61 { a=-a;
return true; }
64 {
if (node1==node2)
return 0;
return 1; }
67 {
if (((node1%
d) == (node2%
d)) || (node1/
d == node2/
d))
return 1;
return 1.5; }
69 {
if ((act == 2)||(act == -2))
return 1.5;
return 1; }
71 {
return node == goal; }
virtual void GetActions(const SequenceAlignmentState &nodeID, std::vector< SequenceAlignmentAction > &actions) const
virtual bool GoalTest(const SequenceAlignmentState &node, const SequenceAlignmentState &goal) const
virtual double GCost(const SequenceAlignmentState &node1, const SequenceAlignmentState &node2) const
virtual void ApplyAction(SequenceAlignmentState &s, SequenceAlignmentAction a) const
virtual void GetSuccessors(const SequenceAlignmentState &nodeID, std::vector< SequenceAlignmentState > &neighbors) const
virtual SequenceAlignmentAction GetAction(const SequenceAlignmentState &s1, const SequenceAlignmentState &s2) const
virtual double HCost(const SequenceAlignmentState &node1, const SequenceAlignmentState &node2) const
Heuristic value between two arbitrary nodes.
virtual bool InvertAction(SequenceAlignmentAction &a) const
virtual uint64_t GetStateHash(const SequenceAlignmentState &node) const
virtual uint64_t GetActionHash(SequenceAlignmentAction act) const
int SequenceAlignmentAction
uint64_t SequenceAlignmentState
Nodes to be stored within a Graph.
virtual void GetNextState(const SequenceAlignmentState &, SequenceAlignmentAction, SequenceAlignmentState &) const