6#ifndef THEORETICA_UTILITY_H
7#define THEORETICA_UTILITY_H
19 template<
typename Type>
26 template<
typename Type,
typename ...Args>
28 std::cout <<
curr <<
" ";
33 template<
typename Type>
40 template<
typename Type,
typename ...Args>
54 template<
typename Type>
56 std::cout <<
curr <<
"\n";
61 template<
typename Type,
typename ...Args>
63 std::cout <<
curr <<
" ";
69 template<
typename Type>
76 template<
typename Type,
typename ...Args>
87 template<
typename Type = real>
113 std::cout <<
"Input conversion error" << std::endl;
132 std::replace(
line.begin(),
line.end(),
',',
'.');
133 return std::stod(
line);
Main namespace of the library which contains all functions and objects.
Definition algebra.h:27
void fprint(std::ostream &out, const Type &last)
Print the given argument to a stream.
Definition utility.h:34
std::remove_reference_t< decltype(std::declval< Structure >()[0])> vector_element_t
Extract the type of a vector (or any indexable container) from its operator[].
Definition core_traits.h:134
void println()
Print a newline to standard output.
Definition utility.h:48
void fprintln(std::ostream &out, const Type &curr)
Print the given argument to an output stream followed by a newline.
Definition utility.h:70
void print(const Type &curr)
Print the given argument to standard output.
Definition utility.h:20
vec< Type > readln(std::istream &in, const std::string &terminator, std::function< Type(std::string)> parse)
Insert a data set of the given type from a stream, reading line by line until a line is equal to the ...
Definition utility.h:88
Vector class and operations.