1. OMPL
  2. OMPL
  3. ompl

Commits

Mark Moll  committed 737c498

cosmetic changes

  • Participants
  • Parent commits 79bc070
  • Branches default

Comments (0)

Files changed (2)

File src/ompl/geometric/planners/prm/src/SPARS.cpp

View file
  • Ignore whitespace
 void ompl::geometric::SPARS::freeMemory(void)
 {
     foreach (DenseVertex v, boost::vertices(g_))
-    {
         if( stateProperty_[v] != NULL )
         {
             si_->freeState(stateProperty_[v]);
             stateProperty_[v] = NULL;
         }
-    }
     foreach (SparseVertex n, boost::vertices(s_))
-    {
         if( sparseStateProperty_[n] != NULL )
         {
             si_->freeState(sparseStateProperty_[n]);
             sparseStateProperty_[n] = NULL;
         }
-    }
     s_.clear();
     g_.clear();
 
     bool found = false;
     DenseVertex ret = boost::graph_traits<DenseGraph>::null_vertex();
     do
-    {
         found = sampler_->sample(workState);
-    } while (!found);
+    while (!found);
     if (found)
         ret = addMilestone(si_->cloneState(workState));
     return ret;
     if (!simpleSampler_)
         simpleSampler_ = si_->allocStateSampler();
 
-    unsigned int nrStartStates = boost::num_vertices(g_);
+    unsigned int nrStartStates = boost::num_vertices(g_) - 1; // don't count query vertex
     OMPL_INFORM("Starting with %u states", nrStartStates);
 
     // Reset addedSolution_ member
         getVisibleNeighbors( lastState_ );
         //Check for addition for Coverage
         if( !checkAddCoverage( graphNeighborhood_ ) )
-        {
             //If not for Coverage, then Connectivity
             if( !checkAddConnectivity( graphNeighborhood_ ) )
-            {
                 //Check for the existence of an interface
                 if( !checkAddInterface( graphNeighborhood_, visibleNeighborhood_, q ) )
-                {
                     //Then check to see if it's on an interface
                     getInterfaceNeighborhood( q );
                     if( interfaceNeighborhood_.size() > 0 )
                     {
                         //Check for addition for spanner prop
                         if( !checkAddPath( q, interfaceNeighborhood_ ) )
-                        {
                             //All of the tests have failed.  Report failure for the sample
                             ++iterations_;
-                        }
                     }
                     else
-                    {
                         //There's no interface here, so drop it
                         ++iterations_;
-                    }
-                }
-            }
-        }
     }
 
     haveSolution( startM_, goalM_, sol );
 
     if (sol)
-    {
         pdef_->addSolutionPath (sol, false);
-    }
 
     // Return true if any solution was found.
     return sol ? base::PlannerStatus::EXACT_SOLUTION : base::PlannerStatus::TIMEOUT;
     const std::vector<DenseVertex>& neighbors = connectionStrategy_(m);
 
     foreach (DenseVertex n, neighbors)
-    {
         if (si_->checkMotion(stateProperty_[m], stateProperty_[n]))
         {
             const double weight = distanceFunction(m, n);
 
             boost::add_edge(m, n, properties, g_);
         }
-    }
 
     nn_->add(m);
 
 {
     //For each of these neighbors,
     foreach( SparseVertex n, neigh )
-    {
         //If path between is free
         if( si_->checkMotion( lastState_, sparseStateProperty_[n] ) )
-        {
             //Abort out and return false
             return false;
-        }
-    }
     //No free paths means we add for coverage
     addGuard( si_->cloneState(lastState_), COVERAGE );
     return true;
     std::vector< SparseVertex > links;
     //For each neighbor
     for (std::size_t i = 0; i < neigh.size(); ++i )
-    {
         //For each other neighbor
         for (std::size_t j = i + 1; j < neigh.size(); ++j )
-        {
             //If they are in different components
             if( !boost::same_component( neigh[i], neigh[j], sparseDJSets_ ) )
-            {
                 //If the paths between are collision free
                 if( si_->checkMotion( lastState_, sparseStateProperty_[neigh[i]] ) && si_->checkMotion( lastState_, sparseStateProperty_[neigh[j]] ) )
                 {
                     links.push_back( neigh[i] );
                     links.push_back( neigh[j] );
                 }
-            }
-        }
-    }
 
     if( links.size() != 0 )
     {
         SparseVertex g = addGuard( si_->cloneState(lastState_), CONNECTIVITY );
 
         for (std::size_t i = 0; i < links.size(); ++i )
-        {
             //If there's no edge
             if (!boost::edge(g, links[i], s_).second)
-            {
                 //And the components haven't been united by previous links
                 if (!boost::same_component( links[i], g, sparseDJSets_))
-                {
                     connectSparsePoints( g, links[i] );
-                }
-            }
-        }
         return true;
     }
     return false;
 {
     //If we have more than 1 neighbor
     if( visibleNeighborhood_.size() > 1 )
-    {
         //If our closest neighbors are also visible
         if( graphNeighborhood_[0] == visibleNeighborhood_[0] && graphNeighborhood_[1] == visibleNeighborhood_[1] )
-        {
             //If our two closest neighbors don't share an edge
             if( !boost::edge( visibleNeighborhood_[0], visibleNeighborhood_[1], s_ ).second )
             {
                     return true;
                 }
             }
-        }
-    }
     return false;
 }
 
     std::vector< SparseVertex > n_rep;
 
     foreach( DenseVertex qp, neigh )
-    {
         //If we haven't tracked this representative
         if( std::find( n_rep.begin(), n_rep.end(), representativesProperty_[qp] ) == n_rep.end() )
-        {
             n_rep.push_back( representativesProperty_[qp] );
-        }
-    }
 
     //for each v' in n_rep
     for (std::size_t i = 0; i < n_rep.size() && !ret; ++i )
             foreach( SparseVertex x, Xs_ )
             {
                 //Compute/Retain MAXimum distance path thorugh S
-                double dist = ( si_->distance( sparseStateProperty_[x], sparseStateProperty_[v] ) + si_->distance( sparseStateProperty_[v], sparseStateProperty_[vp] ) )/2.0;
+                double dist = (si_->distance(sparseStateProperty_[x], sparseStateProperty_[v])
+                    + si_->distance(sparseStateProperty_[v], sparseStateProperty_[vp])) / 2.0;
                 if( dist > s_max )
                     s_max = dist;
             }
                 foreach( DenseVertex qpp, interfaceListsProperty_[v][vpp] )
                 {
                     if( representativesProperty_[qpp] != v )
-                    {
                         throw Exception(name_, "Representative mismatch!");
-                    }
                     else
                     {
                         //If they happen to be the one and same node
                     bestDPath.push_back( stateProperty_[nb] );
 
                     if( representativesProperty_[na] != vp || representativesProperty_[nb] != vpp )
-                    {
                         throw Exception(name_, "Inappropriate representatives found.");
-                    }
                     //Add the dense path to the spanner
                     addPathToSpanner( bestDPath, vpp, vp );
 
 {
     double degree = 0.0;
     foreach (DenseVertex v, boost::vertices(s_))
-    {
         degree += (double)boost::out_degree(v, s_);
-    }
     degree /= (double)boost::num_vertices(s_);
     return degree;
 }
 
     std::vector< DenseVertex > neigh;
     for (std::size_t i = 0; i < hold.size() ; ++i)
-    {
         if (si_->checkMotion(stateProperty_[v], stateProperty_[hold[i]]))
-        {
             neigh.push_back(hold[i]);
-        }
-    }
 
     foreach (DenseVertex vp, neigh)
-    {
         connectDensePoints(v, vp);
-    }
 }
 
 void ompl::geometric::SPARS::approachSpanner( SparseVertex n )
 
     std::vector< SparseVertex > neigh;
     for (std::size_t i = 0; i < hold.size(); ++i)
-    {
         if( si_->checkMotion( sparseStateProperty_[n], sparseStateProperty_[hold[i]] ) )
-        {
             neigh.push_back( hold[i] );
-        }
-    }
 
     foreach( SparseVertex np, neigh )
-    {
         connectSparsePoints( n, np );
-    }
 }
 
 void ompl::geometric::SPARS::getSparseNeighbors( base::State* inState )
     visibleNeighborhood_.clear();
     //Now that we got the neighbors from the NN, we must remove any we can't see
     for (std::size_t i = 0; i < hold.size(); ++i)
-    {
         if( si_->checkMotion( inState, sparseStateProperty_[hold[i]] ) )
-        {
             visibleNeighborhood_.push_back( hold[i] );
-        }
-    }
 }
 
 ompl::geometric::SPARS::DenseVertex ompl::geometric::SPARS::getInterfaceNeighbor(DenseVertex q, SparseVertex rep)
 
     //For each neighbor
     for (std::size_t i = 0; i < graphNeighborhood_.size(); ++i)
-    {
         if( si_->checkMotion( stateProperty_[q], sparseStateProperty_[graphNeighborhood_[i]] ) )
         {
             //update the representative
             //abort
             break;
         }
-    }
 }
 
 void ompl::geometric::SPARS::addToRep( DenseVertex q, SparseVertex rep, const std::vector<ompl::geometric::SPARS::SparseVertex>& oreps )
     {
         //Add it to the pool of non-interface nodes
         if( std::find( nonInterfaceListsProperty_[rep].begin(), nonInterfaceListsProperty_[rep].end(), q ) == nonInterfaceListsProperty_[rep].end() )
-        {
             nonInterfaceListsProperty_[rep].push_back( q );
-        }
         else
-        {
             throw Exception(name_, "Node already tracked in non-interface list");
-        }
     }
     else
     {
         foreach( SparseVertex v, oreps )
         {
             if( std::find( interfaceListsProperty_[rep][v].begin(), interfaceListsProperty_[rep][v].end(), q ) != interfaceListsProperty_[rep][v].end() )
-            {
                 throw Exception(name_, "Node already in interface list");
-            }
             else
             {
                 if( rep != representativesProperty_[q] )
-                {
                     throw Exception(name_, "Node has representative different than the list he's being put into.");
-                }
                 //Add this node to the list for that representative
                 interfaceListsProperty_[rep][v].push_back( q );
             }
     // Remove the node from the non-interface points (if there)
     nonInterfaceListsProperty_[rep].remove( q );
     if( std::find( nonInterfaceListsProperty_[rep].begin(), nonInterfaceListsProperty_[rep].end(), q ) != nonInterfaceListsProperty_[rep].end() )
-    {
         throw Exception(name_, "The point could not be removed?");
-    }
     // From each of the interfaces
     foreach( SparseVertex vpp, interfaceListsProperty_[rep] | boost::adaptors::map_keys )
     {
         // Remove this node from that list
         interfaceListsProperty_[rep][vpp].remove( q );
         if( std::find( interfaceListsProperty_[rep][vpp].begin(), interfaceListsProperty_[rep][vpp].end(), q ) != interfaceListsProperty_[rep][vpp].end() )
-        {
             throw Exception(name_, "Point is some how impossible to remove?");
-        }
     }
 }
 
     VPPs_.clear();
 
     foreach( SparseVertex cvpp, boost::adjacent_vertices( v, s_ ) )
-    {
         if( cvpp != vp )
-        {
             if( !boost::edge( cvpp, vp, s_ ).second )
-            {
                 VPPs_.push_back( cvpp );
-            }
-        }
-    }
 }
 
 void ompl::geometric::SPARS::computeX( SparseVertex v, SparseVertex vp, SparseVertex vpp )
     Xs_.clear();
 
     foreach( SparseVertex cx, boost::adjacent_vertices( vpp, s_ ) )
-    {
         if( boost::edge( cx, v, s_ ).second && !boost::edge( cx, vp, s_ ).second )
-        {
             if( interfaceListsProperty_[vpp][cx].size() > 0 )
-            {
                 Xs_.push_back( cx );
-            }
-        }
-    }
     Xs_.push_back( vpp );
 }
 
 void ompl::geometric::SPARS::getInterfaceNeighborRepresentatives( ompl::geometric::SPARS::DenseVertex q )
 {
     interfaceRepresentatives_.clear();
-
-    //Get our representative
+    // Get our representative
     SparseVertex rep = representativesProperty_[q];
-    //For each neighbor we are connected to
+    // For each neighbor we are connected to
     foreach( DenseVertex n, boost::adjacent_vertices( q, g_ ) )
     {
-        //Get his representative
+        // Get his representative
         SparseVertex orep = representativesProperty_[n];
-        //If that representative is not our own
+        // If that representative is not our own
         if( orep != rep )
-        {
-            //If he is within denseDelta_
+            // If he is within denseDelta_
             if( distanceFunction( q, n ) < denseDelta_ )
-            {
-                //And we haven't tracked him yet
-                if( std::find( interfaceRepresentatives_.begin(), interfaceRepresentatives_.end(), orep ) == interfaceRepresentatives_.end() )
-                {
-                    //Append his rep to the list
+                // And we haven't tracked him yet
+                if( std::find( interfaceRepresentatives_.begin(), interfaceRepresentatives_.end(), orep )
+                    == interfaceRepresentatives_.end() )
+                    // Append his rep to the list
                     interfaceRepresentatives_.push_back( orep );
-                }
-            }
-        }
     }
 }
 
 void ompl::geometric::SPARS::getInterfaceNeighborhood( ompl::geometric::SPARS::DenseVertex q )
 {
     interfaceNeighborhood_.clear();
-
-    //Get our representative
+    // Get our representative
     SparseVertex rep = representativesProperty_[q];
-    //For each neighbor we are connected to
+    // For each neighbor we are connected to
     foreach( DenseVertex n, boost::adjacent_vertices( q, g_ ) )
-    {
-        //Get his representative
-        SparseVertex orep = representativesProperty_[n];
-        //If that representative is not our own
-        if( orep != rep )
-        {
-            //If he is within denseDelta_
+        // If neighbor representative is not our own
+        if( representativesProperty_[n] != rep )
+            // If he is within denseDelta_
             if( distanceFunction( q, n ) < denseDelta_ )
-            {
-                //Append him to the list
+                // Append him to the list
                 interfaceNeighborhood_.push_back( n );
-            }
-        }
-    }
 }
 
 ompl::base::PathPtr ompl::geometric::SPARS::constructSolution(const SparseVertex start, const SparseVertex goal) const
                         boost::predecessor_map(prev));
 
     if (prev[goal] == goal)
-    {
         OMPL_WARN("No dense path was found?");
-    }
     else
     {
         for (DenseVertex pos = goal; prev[pos] != pos; pos = prev[pos])
 
     // Make sure to add edge-less nodes as well
     foreach (const SparseVertex n, boost::vertices(s_))
-    {
         if (boost::out_degree( n, s_ ) == 0)
-        {
             data.addVertex( base::PlannerDataVertex(sparseStateProperty_[n], sparseColorProperty_[n]));
-        }
-    }
 }

File src/ompl/geometric/planners/prm/src/SPARStwo.cpp

View file
  • Ignore whitespace
     foreach (Vertex v, boost::vertices(g_))
     {
         foreach( InterfaceData d, interfaceDataProperty_[v] | boost::adaptors::map_values )
-        {
             clearInterfaceData( d, si_ );
-        }
         if( stateProperty_[v] != NULL )
-        {
             si_->freeState(stateProperty_[v]);
-        }
         stateProperty_[v] = NULL;
     }
     g_.clear();
 {
     base::Goal *g = pdef_->getGoal().get();
     foreach (Vertex start, starts)
-    {
         foreach (Vertex goal, goals)
-        {
             if (boost::same_component(start, goal, disjointSets_) &&
                 g->isStartGoalPairValid(stateProperty_[goal], stateProperty_[start]))
             {
                 solution = constructSolution(start, goal);
                 return true;
             }
-        }
-    }
 
     return false;
 }
 
     // Add the valid goal states as milestones
     while (const base::State *st = pis_.nextGoal())
-    {
         goalM_.push_back(addGuard(si_->cloneState(st), GOAL ));
-    }
     if (goalM_.empty())
     {
         OMPL_ERROR("Unable to find any valid goal states");
     OMPL_INFORM("Created %u states", boost::num_vertices(g_) - nrStartStates);
 
     if (sol)
-    {
         pdef_->addSolutionPath (sol, false);
-    }
 
     // Return true if any solution was found.
     return sol ? base::PlannerStatus::EXACT_SOLUTION : base::PlannerStatus::TIMEOUT;
     {
         //For each neighbor
         for( size_t i=0; i<visibleNeighborhood_.size(); ++i )
-        {
             //For each other neighbor
             for( size_t j=i+1; j<visibleNeighborhood_.size(); ++j )
-            {
                 //If they are in different components
                 if( !boost::same_component( visibleNeighborhood_[i], visibleNeighborhood_[j], disjointSets_ ) )
                 {
                     links.push_back( visibleNeighborhood_[i] );
                     links.push_back( visibleNeighborhood_[j] );
                 }
-            }
-        }
 
         if( links.size() != 0 )
         {
             Vertex g = addGuard( si_->cloneState( qNew_ ), CONNECTIVITY );
 
             for( size_t i=0; i<links.size(); ++i )
-            {
                 //If there's no edge
                 if( !boost::edge(g, links[i], g_).second )
-                {
                     //And the components haven't been united by previous links
                     if( !boost::same_component( links[i], g, disjointSets_ ) )
-                    {
                         connect( g, links[i] );
-                    }
-                }
-            }
             return true;
         }
     }
 {
     //If we have more than 1 or 0 neighbors
     if( visibleNeighborhood_.size() > 1 )
-    {
         if( graphNeighborhood_[0] == visibleNeighborhood_[0] && graphNeighborhood_[1] == visibleNeighborhood_[1] )
-        {
             //If our two closest neighbors don't share an edge
             if( !boost::edge( visibleNeighborhood_[0], visibleNeighborhood_[1], g_ ).second )
             {
                     return true;
                 }
             }
-        }
-    }
     return false;
 }
 
 
     std::vector< Vertex > rs;
     foreach( Vertex r, boost::adjacent_vertices( v, g_ ) )
-    {
         rs.push_back(r);
-    }
     for( size_t i=0; i<rs.size() && !ret; ++i )
     {
         Vertex r = rs[i];
             double rm_dist = 0;
             foreach( Vertex rpp, Xs_ )
             {
-                double tmp_dist = (si_->distance( stateProperty_[r], stateProperty_[v] ) + si_->distance( stateProperty_[v], stateProperty_[rpp] ) )/2.0;
+                double tmp_dist = (si_->distance( stateProperty_[r], stateProperty_[v] )
+                    + si_->distance( stateProperty_[v], stateProperty_[rpp] ) )/2.0;
                 if( tmp_dist > rm_dist )
-                {
                     rm_dist = tmp_dist;
-                }
             }
 
             InterfaceData& d = getData( v, r, rp );
             {
                 ret = true; //Report that we added for the path
                 if( si_->checkMotion( stateProperty_[r], stateProperty_[rp] ) )
-                {
                     connect( r, rp );
-                }
                 else
                 {
                     PathGeometric* p = new PathGeometric( si_ );
 
     //Now that we got the neighbors from the NN, we must remove any we can't see
     for( size_t i=0; i<graphNeighborhood_.size(); ++i )
-    {
         if( si_->checkMotion( st, stateProperty_[graphNeighborhood_[i]] ) )
-        {
             visibleNeighborhood_.push_back( graphNeighborhood_[i] );
-        }
-    }
 }
 
 void ompl::geometric::SPARStwo::approachGraph( Vertex v )
 
     std::vector< Vertex > neigh;
     for( size_t i=0; i<hold.size(); ++i )
-    {
         if( si_->checkMotion( stateProperty_[v], stateProperty_[hold[i]] ) )
-        {
             neigh.push_back( hold[i] );
-        }
-    }
 
     foreach( Vertex vp, neigh )
-    {
         connect( v, vp );
-    }
 }
 
 void ompl::geometric::SPARStwo::findGraphRepresentative( base::State* st )
 
     visibleNeighborhood_.clear();
     for( size_t i=0; i<graphNeighborhood_.size() && visibleNeighborhood_.size() == 0; ++i )
-    {
         if( si_->checkMotion( st, stateProperty_[graphNeighborhood_[i]] ) )
-        {
             visibleNeighborhood_.push_back( graphNeighborhood_[i] );
-        }
-    }
 }
 
 void ompl::geometric::SPARStwo::findCloseRepresentatives( void )
             done = true;
             sampler_->sampleNear( holdState_, qNew_, denseDelta_ );
             if( !si_->isValid( holdState_) )
-            {
                 done = false;
-            }
             if( si_->distance( qNew_, holdState_ ) > denseDelta_ )
-            {
                 done = false;
-            }
             else if( !si_->checkMotion( qNew_, holdState_ ) )
-            {
                 done = false;
-            }
         } while( !done );
         //Compute who his graph neighbors are
         findGraphRepresentative( holdState_ );
     computeVPP( rep, r );
     //Then, for each pair Pv(r,r')
     foreach( Vertex rp, VPPs_ )
-    {
         //Try updating the pair info
         distanceCheck( rep, q, r, s, rp );
-    }
 }
 
 void ompl::geometric::SPARStwo::computeVPP( Vertex v, Vertex vp )
 {
     VPPs_.clear();
     foreach( Vertex cvpp, boost::adjacent_vertices( v, g_ ) )
-    {
         if( cvpp != vp )
-        {
             if( !boost::edge( cvpp, vp, g_ ).second )
-            {
                 VPPs_.push_back( cvpp );
-            }
-        }
-    }
 }
 
 void ompl::geometric::SPARStwo::computeX( Vertex v, Vertex vp, Vertex vpp )
     Xs_.clear();
 
     foreach( Vertex cx, boost::adjacent_vertices( vpp, g_ ) )
-    {
         if( boost::edge( cx, v, g_ ).second && !boost::edge( cx, vp, g_ ).second )
         {
             InterfaceData& d = getData( v, vpp, cx );
             if( vpp < cx && d.points_.first.get() != NULL )
-            {
                 Xs_.push_back( cx );
-            }
             else if( cx < vpp && d.points_.second.get() != NULL )
-            {
                 Xs_.push_back( cx );
-            }
         }
-    }
     Xs_.push_back( vpp );
 }
 
 ompl::geometric::SPARStwo::VertexPair ompl::geometric::SPARStwo::index( Vertex vp, Vertex vpp )
 {
     if( vp < vpp )
-    {
         return VertexPair( vp, vpp );
-    }
     else if( vpp < vp )
-    {
         return VertexPair( vpp, vp );
-    }
     else
-    {
         throw Exception( name_, "Trying to get an index where the pairs are the same point!");
-    }
 }
 
 ompl::geometric::SPARStwo::InterfaceData& ompl::geometric::SPARStwo::getData( Vertex v, Vertex vp, Vertex vpp )
     if( r < rp ) // FIRST points represent r (the guy discovered through sampling)
     {
         if( d.points_.first.get() == NULL ) // If the point we're considering replacing (P_v(r,.)) isn't there
-        {
             //Then we know we're doing better, so add it
             d.setFirst( q, s, si_ );
-        }
         else //Otherwise, he is there,
         {
             if( d.points_.second.get() == NULL ) //But if the other guy doesn't exist, we can't compare.
                 //Should probably keep the one that is further away from rep?  Not known what to do in this case.
             }
             else //We know both of these points exist, so we can check some distances
-            {
                 if( si_->distance( q.get(), d.points_.second.get() ) < si_->distance( d.points_.first.get(), d.points_.second.get() ) )
-                {
                     //Distance with the new point is good, so set it.
                     d.setFirst( q, s, si_ );
-                }
-            }
         }
     }
     else // SECOND points represent r (the guy discovered through sampling)
     {
         if( d.points_.second.get() == NULL ) //If the point we're considering replacing (P_V(.,r)) isn't there...
-        {
             //Then we must be doing better, so add it
             d.setSecond( q, s, si_ );
-        }
         else //Otherwise, he is there
         {
             if( d.points_.first.get() == NULL ) //But if the other guy doesn't exist, we can't compare.
                 //Should we be doing something cool here?
             }
             else
-            {
                 if( si_->distance( q.get(), d.points_.first.get() ) < si_->distance( d.points_.second.get(), d.points_.first.get() ) )
-                {
                     //Distance with the new point is good, so set it
                     d.setSecond( q, s, si_ );
-                }
-            }
         }
     }
     //Lastly, save what we have discovered
 
     //For each of the vertices
     foreach( Vertex v, hold )
-    {
         deletePairInfo( v );
-    }
 }
 
 void ompl::geometric::SPARStwo::deletePairInfo( Vertex v )
 {
     foreach (VertexPair r, interfaceDataProperty_[v] | boost::adaptors::map_keys)
-    {
         clearInterfaceData( interfaceDataProperty_[v][r], si_ );
-    }
 }
 
 ompl::geometric::SPARStwo::Vertex ompl::geometric::SPARStwo::addGuard( base::State *state, GuardType type)
     colorProperty_[m] = type;
 
     if( !si_->isValid( state ) )
-    {
         throw Exception( name_, "Attempting to promote a guard which is an invalid state!");
-    }
 
     abandonLists( state );
 
                              base::PlannerDataVertex(stateProperty_[v1], colorProperty_[v1]));
             }
             else
-            {
                 OMPL_ERROR("Edge Vertex Error: [%lu][%lu] > %lu\n", v1, v2, size);
-            }
         }
     }
     else
-    {
         OMPL_INFORM("There are no edges in the graph!\n");
-    }
 
     // Make sure to add edge-less nodes as well
     foreach (const Vertex n, boost::vertices(g_))
-    {
         if( boost::out_degree( n, g_ ) == 0 )
-        {
             data.addVertex( base::PlannerDataVertex(stateProperty_[n], colorProperty_[n] ) );
-        }
-    }
 }