HIBF 1.0.0-rc.1
All Classes Namespaces Files Functions Variables Typedefs Friends Macros Modules Pages Concepts
print_matrix.hpp
1// SPDX-FileCopyrightText: 2006-2025, Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2025, Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
5#pragma once
6
7#include <iostream>
8
9#include <hibf/platform.hpp>
10
11namespace seqan::hibf::layout
12{
13
17template <typename matrix_type, typename matrix_value_type>
18void print_matrix(matrix_type const & matrix,
19 size_t const row_bound,
20 size_t const column_bound,
21 matrix_value_type const inf)
22{
23 for (size_t i = 0; i < row_bound; ++i)
24 {
25 for (size_t j = 0; j < column_bound; ++j)
26 {
27 if (matrix[i][j] == inf)
28 std::cerr << "inf\t";
29 else
30 std::cerr << matrix[i][j] << '\t';
31 }
32 std::cerr << '\n';
33 }
34 std::cerr << '\n';
35}
36
37} // namespace seqan::hibf::layout
void print_matrix(matrix_type const &matrix, size_t const row_bound, size_t const column_bound, matrix_value_type const inf)
Helper function to print a matrix when debugging.
Definition print_matrix.hpp:18
Provides platform and dependency checks.