12 #ifndef INCLUDE_MOLASSEMBLER_DG_EXPLICIT_BOUNDS_GRAPH_H 
   13 #define INCLUDE_MOLASSEMBLER_DG_EXPLICIT_BOUNDS_GRAPH_H 
   17 #include "boost/graph/adjacency_list.hpp" 
   25 namespace Molassembler {
 
   34 namespace DistanceGeometry {
 
   37 class DistanceBoundsMatrix;
 
   61   using EdgeWeightProperty = boost::property<boost::edge_weight_t, double>;
 
   62   using GraphType = boost::adjacency_list<
 
   69   using VertexDescriptor = GraphType::vertex_descriptor;
 
   70   using EdgeDescriptor = GraphType::edge_descriptor;
 
   72   using BoundsMatrix = Eigen::MatrixXd;
 
   92     const BoundsMatrix& bounds
 
  105     const std::vector<VertexDescriptor>& predecessors,
 
  106     const std::vector<double>& distances
 
  113   [[gnu::const]] 
static inline bool isLeft(
const VertexDescriptor i) noexcept {
 
  117   [[gnu::const]] 
static inline bool sameSide(
const VertexDescriptor i, 
const VertexDescriptor j) noexcept {
 
  118     return i % 2 == j % 2;
 
  125   [[gnu::const]] 
static inline VertexDescriptor 
left(
const VertexDescriptor a) noexcept {
 
  133   [[gnu::const]] 
static inline VertexDescriptor 
right(
const VertexDescriptor a) noexcept {
 
  162   double lowerBound(VertexDescriptor a, VertexDescriptor b) 
const;
 
  168   double upperBound(VertexDescriptor a, VertexDescriptor b) 
const;
 
  195   const GraphType& 
graph() 
const;
 
  210   void updateOrAddEdge_(
 
  216   void updateGraphWithFixedDistance_(
 
static VertexDescriptor right(const VertexDescriptor a) noexcept
Get the right subgraph vertex descriptor corresponding to an outer index. 
Definition: ExplicitBoundsGraph.h:133
Result< Eigen::MatrixXd > makeDistanceBounds() const noexcept
Make smooth distance bounds. 
Definition: DistanceBoundsMatrix.h:26
Drives a PRNG. 
Definition: Prng.h:24
static bool sameSide(const VertexDescriptor i, const VertexDescriptor j) noexcept
Explain contradictions between distance bounds on a path. 
Definition: ExplicitBoundsGraph.h:117
std::array< Utils::ElementType, 2 > heaviestAtoms_
Stores the two heaviest element types. 
Definition: ExplicitBoundsGraph.h:208
static bool isLeft(const VertexDescriptor i) noexcept
Check whether a vertex is part of the left subgraph. 
Definition: ExplicitBoundsGraph.h:113
ExplicitBoundsGraph(const PrivateGraph &inner, const DistanceBoundsMatrix &bounds)
Construct from distance bounds matrix. 
Data struct for storing a numeric interval. 
Library internal graph class wrapping BGL types. 
Definition: PrivateGraph.h:26
void addBound(VertexDescriptor a, VertexDescriptor b, const ValueBounds &bound)
Adds a bound between outer vertex indices to the graph. 
Result< Eigen::MatrixXd > makeDistanceMatrix(Random::Engine &engine) noexcept
Generate a distance matrix. 
static void explainContradictionPaths(VertexDescriptor a, VertexDescriptor b, const std::vector< VertexDescriptor > &predecessors, const std::vector< double > &distances)
Explain contradictions between distance bounds on a path. 
Data class for bounded values. 
Definition: ValueBounds.h:23
double maximalImplicitLowerBound(VertexDescriptor i) const 
Returns the length of the maximal implicit lower bound outgoing from a left vertex. 
double lowerBound(VertexDescriptor a, VertexDescriptor b) const 
Fetches the lower bound between outer vertex indices from the graph. 
BGL wrapper to help with distance bounds smoothing. 
Definition: ExplicitBoundsGraph.h:57
double upperBound(VertexDescriptor a, VertexDescriptor b) const 
Fetches the upper bound between outer vertex indices from the graph. 
static VertexDescriptor left(const VertexDescriptor a) noexcept
Get the left subgraph vertex descriptor corresponding to an outer index. 
Definition: ExplicitBoundsGraph.h:125
Partiality
Limit triangle inequality bounds smoothing to a subset of all atoms. 
Definition: Conformers.h:42
const GraphType & graph() const 
Nonmodifiable access to underlying graph.