Bitcoin Core 28.99.0
P2P Digital Currency
Classes | Namespaces | Typedefs | Functions
cluster_linearize.h File Reference
#include <algorithm>
#include <numeric>
#include <optional>
#include <stdint.h>
#include <vector>
#include <utility>
#include <random.h>
#include <span.h>
#include <util/feefrac.h>
#include <util/vecdeque.h>
Include dependency graph for cluster_linearize.h:

Go to the source code of this file.

Classes

class  cluster_linearize::DepGraph< SetType >
 Data structure that holds a transaction graph's preprocessed data (fee, size, ancestors, descendants). More...
 
struct  cluster_linearize::DepGraph< SetType >::Entry
 Information about a single transaction. More...
 
struct  cluster_linearize::SetInfo< SetType >
 A set of transactions together with their aggregate feerate. More...
 
class  cluster_linearize::LinearizationChunking< SetType >
 Data structure encapsulating the chunking of a linearization, permitting removal of subsets. More...
 
class  cluster_linearize::AncestorCandidateFinder< SetType >
 Class encapsulating the state needed to find the best remaining ancestor set. More...
 
class  cluster_linearize::SearchCandidateFinder< SetType >
 Class encapsulating the state needed to perform search for good candidate sets. More...
 

Namespaces

namespace  cluster_linearize
 

Typedefs

using cluster_linearize::ClusterIndex = uint32_t
 Data type to represent transaction indices in clusters. More...
 

Functions

template<typename SetType >
std::vector< FeeFraccluster_linearize::ChunkLinearization (const DepGraph< SetType > &depgraph, Span< const ClusterIndex > linearization) noexcept
 Compute the feerates of the chunks of linearization. More...
 
template<typename SetType >
std::pair< std::vector< ClusterIndex >, bool > cluster_linearize::Linearize (const DepGraph< SetType > &depgraph, uint64_t max_iterations, uint64_t rng_seed, Span< const ClusterIndex > old_linearization={}) noexcept
 Find or improve a linearization for a cluster. More...
 
template<typename SetType >
void cluster_linearize::PostLinearize (const DepGraph< SetType > &depgraph, Span< ClusterIndex > linearization)
 Improve a given linearization. More...
 
template<typename SetType >
std::vector< ClusterIndex > cluster_linearize::MergeLinearizations (const DepGraph< SetType > &depgraph, Span< const ClusterIndex > lin1, Span< const ClusterIndex > lin2)
 Merge two linearizations for the same cluster into one that is as good as both. More...