cMHN
1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
cmhn
utility
read_header.hpp
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-2-Clause
2
3
#ifndef cMHN_UTILITY_READ_HEADER_H
4
#define cMHN_UTILITY_READ_HEADER_H
5
6
#include <sstream>
7
#include <string>
8
9
namespace
cMHN
10
{
16
static
inline
auto
readHeader
(std::string
const
&filename)
17
{
18
std::ifstream file(filename);
19
20
if
(!file.is_open())
21
{
22
pRC::Logging::error
(
"Unable to open input file!"
);
23
}
24
25
std::string line;
26
std::getline(file, line);
27
28
return
line;
29
}
30
}
31
32
#endif
// cMHN_UTILITY_READ_HEADER_H
cMHN
Definition
calculate_pTheta.hpp:20
cMHN::readHeader
static auto readHeader(std::string const &filename)
Reads the header of a dataset from file.
Definition
read_header.hpp:16
pRC::Logging::error
static void error(Xs &&...args)
Definition
log.hpp:14
Generated by
1.11.0