fastq_to_fasta
A template for creation of SeqAn3 apps, with a FASTQ to FASTA example app.
node_data.hpp
Go to the documentation of this file.
1 // --------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2022, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/raptor/blob/main/LICENSE.md
6 // --------------------------------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <vector>
11 
12 #include <lemon/list_graph.h>
13 
15 
16 namespace raptor::hibf
17 {
18 
19 struct node_data // rename:ibf_data? or ibf_node_data
20 {
21  size_t parent_bin_index{};
22  size_t max_bin_index{};
24  lemon::ListDigraph::Node favourite_child{lemon::INVALID};
25  std::vector<chopper_pack_record> remaining_records{}; // non-merged bins (either split or single)
26 
27  bool operator==(node_data const & rhs) const
28  {
31 
32  if (remaining_records.size() != rhs.remaining_records.size())
33  return false;
34 
35  for (size_t i = 0; i < remaining_records.size(); ++i)
36  res &= (remaining_records[i] == rhs.remaining_records[i]);
37 
38  return res;
39  }
40 
41  bool operator!=(node_data const & rhs) const
42  {
43  return !(*this == rhs);
44  }
45 };
46 
47 } // namespace raptor::hibf
Must be first include.
Definition: bin_prefixes.hpp:13
Definition: node_data.hpp:20
size_t number_of_technical_bins
Definition: node_data.hpp:23
bool operator==(node_data const &rhs) const
Definition: node_data.hpp:27
lemon::ListDigraph::Node favourite_child
Definition: node_data.hpp:24
size_t parent_bin_index
Definition: node_data.hpp:21
std::vector< chopper_pack_record > remaining_records
Definition: node_data.hpp:25
size_t max_bin_index
Definition: node_data.hpp:22
bool operator!=(node_data const &rhs) const
Definition: node_data.hpp:41