suanPan
suanPan.h File Reference
#include <iostream>
#include <armadillo/armadillo>
#include <filesystem>
#include <fmt/color.h>
#include <mutex>
#include <functional>
#include <memory>
Include dependency graph for suanPan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  suanpan
 

Concepts

concept  sp_d
 
concept  sp_i
 

Macros

#define SUANPAN_DEBUG
 
#define SUANPAN_EXTRA_DEBUG
 
#define ARMA_USE_SUPERLU
 
#define SUANPAN_IMPORT   extern "C"
 
#define SUANPAN_EXPORT   extern "C"
 
#define _strcmpi   strcasecmp
 
#define suanpan_sort   std::sort
 
#define suanpan_for_each   std::for_each
 
#define ARMA_COUT_STREAM   SUANPAN_COUT
 
#define ARMA_CERR_STREAM   SUANPAN_COUT
 
#define suanpan_info   suanpan::info
 
#define suanpan_highlight   suanpan::highlight
 
#define suanpan_debug(...)   suanpan::debug(__FILE__, __LINE__, ##__VA_ARGS__)
 
#define suanpan_warning(...)   suanpan::warning(__FILE__, __LINE__, ##__VA_ARGS__)
 
#define suanpan_error(...)   suanpan::error(__FILE__, __LINE__, ##__VA_ARGS__)
 
#define suanpan_fatal(...)   suanpan::fatal(__FILE__, __LINE__, ##__VA_ARGS__)
 

Functions

std::string suanpan::pattern (const std::string_view header, const std::string_view file_name, const std::string_view format)
 
template<typename... T>
void suanpan::debug (const std::string_view file_name, const int line, const std::string_view format_str, const T &... args)
 
template<typename... T>
void suanpan::warning (const std::string_view file_name, const int line, const std::string_view format_str, const T &... args)
 
template<typename... T>
void suanpan::error (const std::string_view file_name, const int line, const std::string_view format_str, const T &... args)
 
template<typename... T>
void suanpan::fatal (const std::string_view file_name, const int line, const std::string_view format_str, const T &... args)
 
template<typename... T>
void suanpan::info (const std::string_view format_str, const T &... args)
 
template<typename... T>
std::string suanpan::format (const std::string_view format_str, const T &... args)
 
template<typename T >
std::string suanpan::format (const Col< T > &in_vec)
 
template<typename T >
void suanpan::info (const Col< T > &in_vec)
 
template<typename T >
void suanpan::info (const std::string_view format_str, const Col< T > &in_vec)
 
template<typename... T>
void suanpan::highlight (const std::string_view format_str, const T &... args)
 
void suanpan_assert (const std::function< void()> &F)
 
template<class IN , class FN >
requires requires(IN& x) { x.begin(); x.end(); }
void suanpan::for_all (IN &from, FN &&func)
 
template<typename T1 >
enable_if2< is_arma_type< T1 >::value, typenameT1::pod_type >::result inf_norm (const T1 &X)
 

Variables

SUANPAN_EXPORT bool SUANPAN_PRINT
 
SUANPAN_EXPORT bool SUANPAN_VERBOSE
 
SUANPAN_EXPORT bool SUANPAN_COLOR
 
SUANPAN_EXPORT unsigned SUANPAN_WARNING_COUNT
 
SUANPAN_EXPORT unsigned SUANPAN_ERROR_COUNT
 
constexpr auto SUANPAN_EXIT = 1
 
constexpr auto SUANPAN_SUCCESS = 0
 
constexpr auto SUANPAN_FAIL = -1
 
auto & SUANPAN_COUT = std::cout
 
auto & SUANPAN_CWRN = std::cout
 
auto & SUANPAN_CERR = std::cout
 
auto & SUANPAN_CFTL = std::cout
 
std::mutex suanpan::print_mutex
 

Macro Definition Documentation

◆ _strcmpi

#define _strcmpi   strcasecmp

◆ ARMA_CERR_STREAM

#define ARMA_CERR_STREAM   SUANPAN_COUT

◆ ARMA_COUT_STREAM

#define ARMA_COUT_STREAM   SUANPAN_COUT

◆ ARMA_USE_SUPERLU

#define ARMA_USE_SUPERLU

◆ SUANPAN_DEBUG

#define SUANPAN_DEBUG

◆ suanpan_debug

#define suanpan_debug (   ...)    suanpan::debug(__FILE__, __LINE__, ##__VA_ARGS__)

◆ suanpan_error

#define suanpan_error (   ...)    suanpan::error(__FILE__, __LINE__, ##__VA_ARGS__)

◆ SUANPAN_EXPORT

#define SUANPAN_EXPORT   extern "C"

◆ SUANPAN_EXTRA_DEBUG

#define SUANPAN_EXTRA_DEBUG

◆ suanpan_fatal

#define suanpan_fatal (   ...)    suanpan::fatal(__FILE__, __LINE__, ##__VA_ARGS__)

◆ suanpan_for_each

#define suanpan_for_each   std::for_each

◆ suanpan_highlight

#define suanpan_highlight   suanpan::highlight

◆ SUANPAN_IMPORT

#define SUANPAN_IMPORT   extern "C"

◆ suanpan_info

#define suanpan_info   suanpan::info

◆ suanpan_sort

#define suanpan_sort   std::sort

◆ suanpan_warning

#define suanpan_warning (   ...)    suanpan::warning(__FILE__, __LINE__, ##__VA_ARGS__)

Function Documentation

◆ inf_norm()

template<typename T1 >
enable_if2< is_arma_type< T1 >::value, typenameT1::pod_type >::result inf_norm ( const T1 &  X)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ suanpan_assert()

void suanpan_assert ( const std::function< void()> &  F)
inline
Here is the caller graph for this function:

Variable Documentation

◆ SUANPAN_CERR

auto& SUANPAN_CERR = std::cout
inline

◆ SUANPAN_CFTL

auto& SUANPAN_CFTL = std::cout
inline

◆ SUANPAN_COLOR

SUANPAN_EXPORT bool SUANPAN_COLOR

◆ SUANPAN_COUT

auto& SUANPAN_COUT = std::cout
inline

◆ SUANPAN_CWRN

auto& SUANPAN_CWRN = std::cout
inline

◆ SUANPAN_ERROR_COUNT

SUANPAN_EXPORT unsigned SUANPAN_ERROR_COUNT

◆ SUANPAN_EXIT

constexpr auto SUANPAN_EXIT = 1
constexpr

◆ SUANPAN_FAIL

constexpr auto SUANPAN_FAIL = -1
constexpr

◆ SUANPAN_PRINT

SUANPAN_EXPORT bool SUANPAN_PRINT

◆ SUANPAN_SUCCESS

constexpr auto SUANPAN_SUCCESS = 0
constexpr

◆ SUANPAN_VERBOSE

SUANPAN_EXPORT bool SUANPAN_VERBOSE

◆ SUANPAN_WARNING_COUNT

SUANPAN_EXPORT unsigned SUANPAN_WARNING_COUNT