HIBF
1.0.0-rc.1
Loading...
Searching...
No Matches
graph.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2024, Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2024, Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
10
#pragma once
11
12
#include <
cstddef
>
// for size_t
13
#include <
optional
>
// for nullopt, optional
14
#include <
vector
>
// for vector
15
16
#include <hibf/layout/layout.hpp>
// for layout
17
18
namespace
seqan::hibf::layout
19
{
20
24
struct
graph
25
{
26
30
graph
() =
default
;
31
graph
(
graph
const
&) =
default
;
32
graph
&
operator=
(
graph
const
&) =
default
;
33
graph
(
graph
&&) =
default
;
34
graph
&
operator=
(
graph
&&) =
default
;
35
~graph
() =
default
;
36
37
graph
(
seqan::hibf::layout::layout
const
& hibf_layout);
39
40
struct
node
41
{
42
std::vector<node>
children{};
43
44
size_t
parent_bin_index{};
45
size_t
max_bin_index{};
46
size_t
number_of_technical_bins{};
47
std::optional<size_t>
favourite_child_idx{
std::nullopt
};
48
std::vector<layout::layout::user_bin>
remaining_records{};
// non-merged bins (either split or single)
49
50
bool
max_bin_is_merged()
const
51
{
52
return
favourite_child_idx.
has_value
();
53
}
54
55
// Doesn't work, because the type is incomplete. To compare node, a comparison for the children member is needed.
56
// But children is a std::vector<node>, so a comparison for node is needed to compare children.
57
// https://godbolt.org/z/arrr4YKae
58
// friend auto operator<=>(node const &, node const &) = default;
59
};
60
61
node
root;
62
};
63
64
}
// namespace seqan::hibf::layout
cstddef
std::is_base_of_v
T is_base_of_v
std::optional::has_value
T has_value(T... args)
optional
seqan::hibf::layout::graph::node
Definition
graph.hpp:41
seqan::hibf::layout::graph
Contains the layout graph structure.
Definition
graph.hpp:25
seqan::hibf::layout::graph::graph
graph(seqan::hibf::layout::layout const &hibf_layout)
Defaulted.
seqan::hibf::layout::graph::graph
graph(graph &&)=default
Defaulted.
seqan::hibf::layout::graph::~graph
~graph()=default
Defaulted.
seqan::hibf::layout::graph::operator=
graph & operator=(graph const &)=default
Defaulted.
seqan::hibf::layout::graph::operator=
graph & operator=(graph &&)=default
Defaulted.
seqan::hibf::layout::graph::graph
graph(graph const &)=default
Defaulted.
seqan::hibf::layout::graph::graph
graph()=default
Defaulted.
seqan::hibf::layout::layout
The layout.
Definition
layout.hpp:22
vector
hibf
layout
graph.hpp
Generated on Thu Aug 29 2024 00:01:59 for HIBF by
1.10.0