Bitcoin Core 30.99.0
P2P Digital Currency
Public Member Functions | Public Attributes | Friends | List of all members
cluster_linearize::SetInfo< SetType > Struct Template Reference

A set of transactions together with their aggregate feerate. More...

#include <cluster_linearize.h>

Collaboration diagram for cluster_linearize::SetInfo< SetType >:
[legend]

Public Member Functions

 SetInfo () noexcept=default
 Construct a SetInfo for the empty set. More...
 
 SetInfo (const SetType &txn, const FeeFrac &fr) noexcept
 Construct a SetInfo for a specified set and feerate. More...
 
 SetInfo (const DepGraph< SetType > &depgraph, DepGraphIndex pos) noexcept
 Construct a SetInfo for a given transaction in a depgraph. More...
 
 SetInfo (const DepGraph< SetType > &depgraph, const SetType &txn) noexcept
 Construct a SetInfo for a set of transactions in a depgraph. More...
 
void Set (const DepGraph< SetType > &depgraph, DepGraphIndex pos) noexcept
 Add a transaction to this SetInfo (which must not yet be in it). More...
 
SetInfooperator|= (const SetInfo &other) noexcept
 Add the transactions of other to this SetInfo (no overlap allowed). More...
 
SetInfooperator-= (const SetInfo &other) noexcept
 Remove the transactions of other from this SetInfo (which must be a subset). More...
 
SetInfo operator- (const SetInfo &other) const noexcept
 Compute the difference between this and other SetInfo (which must be a subset). More...
 

Public Attributes

SetType transactions
 The transactions in the set. More...
 
FeeFrac feerate
 Their combined fee and size. More...
 

Friends

void swap (SetInfo &a, SetInfo &b) noexcept
 Swap two SetInfo objects. More...
 
bool operator== (const SetInfo &, const SetInfo &) noexcept=default
 Permit equality testing. More...
 

Detailed Description

template<typename SetType>
struct cluster_linearize::SetInfo< SetType >

A set of transactions together with their aggregate feerate.

Definition at line 360 of file cluster_linearize.h.

Constructor & Destructor Documentation

◆ SetInfo() [1/4]

template<typename SetType >
cluster_linearize::SetInfo< SetType >::SetInfo ( )
defaultnoexcept

Construct a SetInfo for the empty set.

◆ SetInfo() [2/4]

template<typename SetType >
cluster_linearize::SetInfo< SetType >::SetInfo ( const SetType &  txn,
const FeeFrac fr 
)
inlinenoexcept

Construct a SetInfo for a specified set and feerate.

Definition at line 371 of file cluster_linearize.h.

◆ SetInfo() [3/4]

template<typename SetType >
cluster_linearize::SetInfo< SetType >::SetInfo ( const DepGraph< SetType > &  depgraph,
DepGraphIndex  pos 
)
inlineexplicitnoexcept

Construct a SetInfo for a given transaction in a depgraph.

Definition at line 374 of file cluster_linearize.h.

◆ SetInfo() [4/4]

template<typename SetType >
cluster_linearize::SetInfo< SetType >::SetInfo ( const DepGraph< SetType > &  depgraph,
const SetType &  txn 
)
inlineexplicitnoexcept

Construct a SetInfo for a set of transactions in a depgraph.

Definition at line 378 of file cluster_linearize.h.

Member Function Documentation

◆ operator-()

template<typename SetType >
SetInfo cluster_linearize::SetInfo< SetType >::operator- ( const SetInfo< SetType > &  other) const
inlinenoexcept

Compute the difference between this and other SetInfo (which must be a subset).

Definition at line 408 of file cluster_linearize.h.

◆ operator-=()

template<typename SetType >
SetInfo & cluster_linearize::SetInfo< SetType >::operator-= ( const SetInfo< SetType > &  other)
inlinenoexcept

Remove the transactions of other from this SetInfo (which must be a subset).

Definition at line 399 of file cluster_linearize.h.

◆ operator|=()

template<typename SetType >
SetInfo & cluster_linearize::SetInfo< SetType >::operator|= ( const SetInfo< SetType > &  other)
inlinenoexcept

Add the transactions of other to this SetInfo (no overlap allowed).

Definition at line 390 of file cluster_linearize.h.

◆ Set()

template<typename SetType >
void cluster_linearize::SetInfo< SetType >::Set ( const DepGraph< SetType > &  depgraph,
DepGraphIndex  pos 
)
inlinenoexcept

Add a transaction to this SetInfo (which must not yet be in it).

Definition at line 382 of file cluster_linearize.h.

Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator==

template<typename SetType >
bool operator== ( const SetInfo< SetType > &  ,
const SetInfo< SetType > &   
)
friend

Permit equality testing.

◆ swap

template<typename SetType >
void swap ( SetInfo< SetType > &  a,
SetInfo< SetType > &  b 
)
friend

Swap two SetInfo objects.

Definition at line 415 of file cluster_linearize.h.

Member Data Documentation

◆ feerate

template<typename SetType >
FeeFrac cluster_linearize::SetInfo< SetType >::feerate

Their combined fee and size.

Definition at line 365 of file cluster_linearize.h.

◆ transactions

template<typename SetType >
SetType cluster_linearize::SetInfo< SetType >::transactions

The transactions in the set.

Definition at line 363 of file cluster_linearize.h.


The documentation for this struct was generated from the following file: