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

Construct a DepGraph object given another DepGraph and a mapping from old to new&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
DepGraph(
    xref:cluster_linearize/DepGraph.adoc[DepGraph&lt;SetType&gt;] const& depgraph,
    std::span&lt;DepGraphIndex const&gt; mapping,
    xref:cluster_linearize/DepGraphIndex.adoc[DepGraphIndex] pos&lowbar;range) noexcept;
----

== Description

Complexity&colon; O(N&circ;2) where N&equals;depgraph&period;TxCount()&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *depgraph*
| The original DepGraph that is being remapped&period;
| *mapping*
| A span such that mapping&lsqb;i&rsqb;gives the position in the new DepGraph for position i in the old depgraph&period; Its size must be equal to depgraph&period;PositionRange()&period; The value of mapping&lsqb;i&rsqb;is ignored if position i is a hole in depgraph (i&period;e&period;, if !depgraph&period;Positions()&lsqb;i&rsqb;)&period;
| *pos&lowbar;range*
| The PositionRange() for the new DepGraph&period; It must equal the largest value in mapping for any used position in depgraph plus 1, or 0 if depgraph&period;TxCount() &equals;&equals; 0&period;
|===


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