/*** * @Date: 2020-09-19 16:10:21 * @Author: Qing Shuai * @LastEditors: Qing Shuai * @LastEditTime: 2020-09-24 21:09:58 * @FilePath: /MatchLR/include/match/base.h */ #pragma once #include #include "Eigen/Dense" #include #include namespace match { typedef float Type; typedef Eigen::Matrix Mat; typedef Eigen::Array Array; template using Vec=std::vector; typedef std::vector List; typedef std::vector ListList; struct MatchInfo { int maxIter = 100; float alpha = 200; float beta = 0.1; float tol = 1e-3; float w_sparse = 0.1; float w_rank = 50; }; typedef std::unordered_map Control; void print(Vec& lists, std::string name){ std::cout << name << ": ["; for(auto i:lists){ std::cout << i << ", "; } std::cout << "]" << std::endl; } } // namespace match