[#cluster_linearize-DepGraph]
= xref:cluster_linearize.adoc[cluster&lowbar;linearize]::DepGraph
:relfileprefix: ../
:mrdocs:

Data structure that holds a transaction graph&apos;s preprocessed data (fee, size, ancestors, descendants)&period;

== Synopsis

Declared in `&lt;cluster&lowbar;linearize&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename SetType&gt;
class DepGraph;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:cluster_linearize/DepGraph/2constructor-08.adoc[`DepGraph`]         [.small]#[constructor]#
| Constructors
| xref:cluster_linearize/DepGraph/operator_assign-077.adoc[`operator&equals;`] 
| Assignment operators
| xref:cluster_linearize/DepGraph/AddDependencies.adoc[`AddDependencies`] 
| Modify this transaction graph, adding multiple parents to a specified child&period;
| xref:cluster_linearize/DepGraph/AddTransaction.adoc[`AddTransaction`] 
| Add a new unconnected transaction to this transaction graph (in the first available position), and return its DepGraphIndex&period;
| xref:cluster_linearize/DepGraph/Ancestors.adoc[`Ancestors`] 
| Get the ancestors of a given transaction i&period; Complexity&colon; O(1)&period;
| xref:cluster_linearize/DepGraph/AppendTopo.adoc[`AppendTopo`] 
| Append the entries of select to list in a topologically valid order&period;
| xref:cluster_linearize/DepGraph/Compact.adoc[`Compact`] 
| Reduce memory usage if possible&period; No observable effect&period;
| xref:cluster_linearize/DepGraph/CountDependencies.adoc[`CountDependencies`] 
| Count the total number of reduced (direct) dependencies in the graph&period;
| xref:cluster_linearize/DepGraph/Descendants.adoc[`Descendants`] 
| Get the descendants of a given transaction i&period; Complexity&colon; O(1)&period;
| xref:cluster_linearize/DepGraph/DynamicMemoryUsage.adoc[`DynamicMemoryUsage`] 
| Report the heap memory used by this graph&period;
| xref:cluster_linearize/DepGraph/FeeRate-0b.adoc[`FeeRate`] 
| `FeeRate` overloads
| xref:cluster_linearize/DepGraph/FindConnectedComponent.adoc[`FindConnectedComponent`] 
| Find some connected component within the subset &quot;todo&quot; of this graph&period;
| xref:cluster_linearize/DepGraph/GetConnectedComponent.adoc[`GetConnectedComponent`] 
| Get the connected component within the subset &quot;todo&quot; that contains tx (which must be in todo)&period;
| xref:cluster_linearize/DepGraph/GetReducedChildren.adoc[`GetReducedChildren`] 
| Compute the (reduced) set of children of node i in this graph&period;
| xref:cluster_linearize/DepGraph/GetReducedParents.adoc[`GetReducedParents`] 
| Compute the (reduced) set of parents of node i in this graph&period;
| xref:cluster_linearize/DepGraph/IsAcyclic.adoc[`IsAcyclic`] 
| Check if this graph is acyclic&period;
| xref:cluster_linearize/DepGraph/IsConnected-07.adoc[`IsConnected`] 
| `IsConnected` overloads
| xref:cluster_linearize/DepGraph/PositionRange.adoc[`PositionRange`] 
| Get the range of positions in this DepGraph&period; All entries in Positions() are in &lsqb;0, PositionRange() &hyphen; 1&rsqb;&period;
| xref:cluster_linearize/DepGraph/Positions.adoc[`Positions`] 
| Get the set of transactions positions in use&period; Complexity&colon; O(1)&period;
| xref:cluster_linearize/DepGraph/RemoveTransactions.adoc[`RemoveTransactions`] 
| Remove the specified positions from this DepGraph&period;
| xref:cluster_linearize/DepGraph/TxCount.adoc[`TxCount`] 
| Get the number of transactions in the graph&period; Complexity&colon; O(1)&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:cluster_linearize/operator_eq-08.adoc[cluster&lowbar;linearize::operator&equals;&equals;]`
| Equality operator (primarily for testing purposes)&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:cluster_linearize/ChunkLinearization.adoc[`ChunkLinearization`]
| Compute the feerates of the chunks of linearization&period; Identical to ChunkLinearizationInfo, but only returns the chunk feerates, not the corresponding transaction sets&period;
| xref:cluster_linearize/ChunkLinearizationInfo.adoc[`ChunkLinearizationInfo`]
| Compute the chunks of linearization as SetInfos&period;
| xref:cluster_linearize/Linearize.adoc[`Linearize`]
| Find or improve a linearization for a cluster&period;
| xref:cluster_linearize/PostLinearize.adoc[`PostLinearize`]
| Improve a given linearization&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
