From d298e4aa1eef080dc561770126ee82139bab05a6 Mon Sep 17 00:00:00 2001 From: johncreed Date: Thu, 27 Jun 2019 11:53:17 +0800 Subject: [PATCH] Remove redundant trailing whitespace in linear.cpp, python/liblinearutil.py and tron.cpp --- linear.cpp | 12 ++++++------ python/liblinearutil.py | 2 +- tron.cpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/linear.cpp b/linear.cpp index 063e01c..5bdc328 100644 --- a/linear.cpp +++ b/linear.cpp @@ -2716,11 +2716,11 @@ void find_parameters(const problem *prob, const parameter *param, int nr_fold, d if(start_C <= 0) start_C = calc_start_C(prob, ¶m_tmp); double max_C = 1024; - start_C = min(start_C, max_C); + start_C = min(start_C, max_C); double best_C_tmp, best_score_tmp; - + find_parameter_C(prob, ¶m_tmp, start_C, max_C, &best_C_tmp, &best_score_tmp, fold_start, perm, subprob, nr_fold); - + *best_C = best_C_tmp; *best_score = best_score_tmp; } @@ -2744,9 +2744,9 @@ void find_parameters(const problem *prob, const parameter *param, int nr_fold, d start_C_tmp = start_C; start_C_tmp = min(start_C_tmp, max_C); double best_C_tmp, best_score_tmp; - + find_parameter_C(prob, ¶m_tmp, start_C_tmp, max_C, &best_C_tmp, &best_score_tmp, fold_start, perm, subprob, nr_fold); - + if(best_score_tmp < *best_score) { *best_p = param_tmp.p; @@ -2961,7 +2961,7 @@ struct model *load_model(const char *model_file_name) // parameters for training only won't be assigned, but arrays are assigned as NULL for safety param.nr_weight = 0; param.weight_label = NULL; - param.weight = NULL; + param.weight = NULL; param.init_sol = NULL; model_->label = NULL; diff --git a/python/liblinearutil.py b/python/liblinearutil.py index ffb161a..a768ecf 100644 --- a/python/liblinearutil.py +++ b/python/liblinearutil.py @@ -14,7 +14,7 @@ if sys.version_info[0] < 3: from itertools import izip as zip _cstr = lambda s: s.encode("utf-8") if isinstance(s,unicode) else str(s) else: - _cstr = lambda s: bytes(s, "utf-8") + _cstr = lambda s: bytes(s, "utf-8") __all__ = ['load_model', 'save_model', 'train', 'predict'] + liblinear_all + common_all diff --git a/tron.cpp b/tron.cpp index c9292ca..2e0cb24 100644 --- a/tron.cpp +++ b/tron.cpp @@ -265,7 +265,7 @@ int TRON::trpcg(double delta, double *g, double *M, double *s, double *r, bool * if (cg_iter == max_cg_iter) info("WARNING: reaching maximal number of CG steps\n"); - + delete[] d; delete[] Hd; delete[] z; -- 2.40.0