36 m_nodeNumber(nodeNum),
39 frequencyOffset(params[0]),
40 frequencyScale(params[1]),
41 radiusOffset(params[2]),
42 radiusScale(params[3]),
47 assert(params.size() == 7);
52 for (std::size_t i = 0; i < couplingList.size(); i++)
54 delete couplingList[i];
59 void CPGNode::addCoupling(
CPGEdge* newEdge)
61 couplingList.push_back(newEdge);
64 void CPGNode::addCoupling(std::vector<CPGEdge*> edgeList){
65 couplingList.insert(couplingList.end(), edgeList.begin(), edgeList.end());
68 void CPGNode::addCoupling(
CPGNode* cNode,
73 CPGNode::addCoupling(newEdge);
78 phiDotValue = 2 * M_PI *
nodeEquation(descCom, frequencyOffset, frequencyScale);
85 for (
int i = 0; i != couplingList.size(); i++){
86 couplingList[i]->couple(*
this);
90 - rValue) - rDotValue);
98 if(d >= dMin && d <= dMax){
106 void CPGNode::updateNodeValues (
double newPhi,
117 std::string CPGNode::toString(
const std::string& prefix)
const
120 std::ostringstream os;
121 os << prefix <<
"CPGNode(" << p <<
m_nodeNumber << std::endl;
125 os << prefix << p <<
"Connectivity:" << std::endl;
126 for(
int i = 0; i < couplingList.size(); i++) {
127 os << prefix << p << p << *(couplingList[i]);
double nodeEquation(double d, double c0, double c1)
Definition of class CPGEdge.
Definition of class CPGNode.
CPGNode(int nodeNum, const std::vector< double > ¶ms)
void updateDTs(double descCom)