]> granicus.if.org Git - liblinear/commitdiff
minor fixes:
authorChih-Jen Lin <cjlin@csie.ntu.edu.tw>
Sat, 7 Nov 2020 08:51:37 +0000 (16:51 +0800)
committerChih-Jen Lin <cjlin@csie.ntu.edu.tw>
Sat, 7 Nov 2020 08:51:37 +0000 (16:51 +0800)
- COPYRIGHT year

- return var instead of return (var) for constancy

COPYRIGHT
linear.cpp
newton.cpp

index cd06ed7f8044a09eb0aaee4890bb164d1f1a710f..3efc02470f01f00d9b9751d62d75d0f4c9c52a4e 100644 (file)
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,5 +1,5 @@
 
-Copyright (c) 2007-2019 The LIBLINEAR Project.
+Copyright (c) 2007-2020 The LIBLINEAR Project.
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
index 59c23ede638b979e7cdef6b98514b4f6c269be34..e52aa45a45c23e2cade7ed35d5a1fdaaac1d88ae 100644 (file)
@@ -56,7 +56,7 @@ public:
                        ret += x->value*x->value;
                        x++;
                }
-               return (ret);
+               return ret;
        }
 
        static double dot(const double *s, const feature_node *x)
@@ -67,7 +67,7 @@ public:
                        ret += s[x->index-1]*x->value;
                        x++;
                }
-               return (ret);
+               return ret;
        }
 
        static double sparse_dot(const feature_node *x1, const feature_node *x2)
@@ -89,7 +89,7 @@ public:
                                        ++x1;
                        }
                }
-               return (ret);
+               return ret;
        }
 
        static void axpy(const double a, const feature_node *x, double *y)
@@ -164,7 +164,7 @@ double l2r_erm_fun::fun(double *w)
                f += C_times_loss(i, wx[i]);
        f = f + 0.5 * wTw;
 
-       return(f);
+       return f;
 }
 
 int l2r_erm_fun::get_nr_variable(void)
@@ -2747,7 +2747,6 @@ static void train_one(const problem *prob, const parameter *param, double *w, do
                        newton_obj.set_print_string(liblinear_print_string);
                        newton_obj.newton(w);
                        break;
-
                }
                case L2R_L1LOSS_SVR_DUAL:
                {
index bb2c3b1e9d36cf62efe4ab83c117d06d78e07962..0fe3ccffc2eb0a65529315b6b214b32baf1b402e 100644 (file)
@@ -242,7 +242,7 @@ int NEWTON::pcg(double *g, double *M, double *s, double *r)
        delete[] Hd;
        delete[] z;
 
-       return(cg_iter);
+       return cg_iter;
 }
 
 void NEWTON::set_print_string(void (*print_string) (const char *buf))