]> granicus.if.org Git - liblinear/commitdiff
Rename get_diagH to get_diag_preconditioner
authorWei-Lin Chiang <infwinston@gmail.com>
Tue, 18 Sep 2018 12:04:55 +0000 (20:04 +0800)
committerWei-Lin Chiang <infwinston@gmail.com>
Tue, 18 Sep 2018 12:04:55 +0000 (20:04 +0800)
linear.cpp
tron.cpp
tron.h

index 1f04a607da8d8a59700e3a395e49efb16c1a9475..d92b1248190976ae18fccdf086cc2f8cb89e69a3 100644 (file)
@@ -91,7 +91,7 @@ public:
        void Hv(double *s, double *Hs);
 
        int get_nr_variable(void);
-       void get_diagH(double *M);
+       void get_diag_preconditioner(double *M);
 
 private:
        void Xv(double *v, double *Xv);
@@ -170,7 +170,7 @@ int l2r_lr_fun::get_nr_variable(void)
        return prob->n;
 }
 
-void l2r_lr_fun::get_diagH(double *M)
+void l2r_lr_fun::get_diag_preconditioner(double *M)
 {
        int i;
        int l = prob->l;
@@ -247,7 +247,7 @@ public:
        void Hv(double *s, double *Hs);
 
        int get_nr_variable(void);
-       void get_diagH(double *M);
+       void get_diag_preconditioner(double *M);
 
 protected:
        void Xv(double *v, double *Xv);
@@ -327,7 +327,7 @@ int l2r_l2_svc_fun::get_nr_variable(void)
        return prob->n;
 }
 
-void l2r_l2_svc_fun::get_diagH(double *M)
+void l2r_l2_svc_fun::get_diag_preconditioner(double *M)
 {
        int i;
        int w_size=get_nr_variable();
index 2d93dc375ea95ebb72447f7e493c02142a971a2e..f1495530b620674d198e1c099a14b2761f242311 100644 (file)
--- a/tron.cpp
+++ b/tron.cpp
@@ -103,7 +103,7 @@ void TRON::tron(double *w)
        if (gnorm <= eps*gnorm0)
                search = 0;
 
-       fun_obj->get_diagH(M);
+       fun_obj->get_diag_preconditioner(M);
        for(i=0; i<n; i++)
                M[i] = (1-alpha_pcg) + alpha_pcg*M[i];
        delta = sqrt(uTMv(n, g, M, g));
@@ -162,7 +162,7 @@ void TRON::tron(double *w)
                        memcpy(w, w_new, sizeof(double)*n);
                        f = fnew;
                        fun_obj->grad(w, g);
-                       fun_obj->get_diagH(M);
+                       fun_obj->get_diag_preconditioner(M);
                        for(i=0; i<n; i++)
                                M[i] = (1-alpha_pcg) + alpha_pcg*M[i];
 
diff --git a/tron.h b/tron.h
index 6c39e185d6dade23b05ca48605ffcc3217113b5e..524fa9c91cf49c5af4d57831e9f6a859fab96d9c 100644 (file)
--- a/tron.h
+++ b/tron.h
@@ -9,7 +9,7 @@ public:
        virtual void Hv(double *s, double *Hs) = 0 ;
 
        virtual int get_nr_variable(void) = 0 ;
-       virtual void get_diagH(double *M) = 0 ;
+       virtual void get_diag_preconditioner(double *M) = 0 ;
        virtual ~function(void){}
 };