utility.h

来自「Amis - A maximum entropy estimator 一个最大」· C头文件 代码 · 共 34 行

H
34
字号
#ifndef Amis_Utility_h_#define Amis_Utility_h_#include <amis/configure.h>#include <iostream>AMIS_NAMESPACE_BEGINclass StringPair : public std::pair< std::string, std::string > {public:  StringPair( const std::string& s1, const std::string& s2 )    : std::pair< std::string, std::string >( s1, s2 ) {}};inline std::ostream& operator<<( std::ostream& os, const StringPair& s ) {  return os << '(' << s.first << ',' << s.second << ')';}class StringTriple : public std::pair< std::string, std::pair< std::string, std::string > > {public:  StringTriple( const std::string& s1, const std::string& s2, const std::string& s3 )    : std::pair< std::string, std::pair< std::string, std::string > >( s1, std::pair< std::string, std::string >( s2, s3 ) ) {}};inline std::ostream& operator<<( std::ostream& os, const StringTriple& s ) {  return os << '(' << s.first << ',' << s.second.first << ',' << s.second.second << ')';}AMIS_NAMESPACE_END#endif // Amis_Utility_h_// end of Utility.h

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?