This file is indexed.

/usr/include/shogun/lib/external/gpdtsolve.h is in libshogun-dev 3.2.0-7.3build4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 *** Authors:                                                               ***
 ***  Thomas Serafini, Luca Zanni                                           ***
 ***   Dept. of Mathematics, University of Modena and Reggio Emilia - ITALY ***
 ***   serafini.thomas@unimo.it, zanni.luca@unimo.it                        ***
 ***  Gaetano Zanghirati                                                    ***
 ***   Dept. of Mathematics, University of Ferrara - ITALY                  ***
 ***   g.zanghirati@unife.it                                                ***
 ***                                                                        ***
 *** Software homepage: http://dm.unife.it/gpdt                             ***
 ***                                                                        ***
 *** This work is supported by the Italian FIRB Projects                    ***
 ***      'Statistical Learning: Theory, Algorithms and Applications'       ***
 ***      (grant RBAU01877P), http://slipguru.disi.unige.it/ASTA            ***
 *** and                                                                    ***
 ***      'Parallel Algorithms and Numerical Nonlinear Optimization'        ***
 ***      (grant RBAU01JYPN), http://dm.unife.it/pn2o                       ***
 ***                                                                        ***
 *** Copyright (C) 2004 by T. Serafini, G. Zanghirati, L. Zanni.            ***
 ***                                                                        ***
 *** SHOGUN adaptions  Written (W) 2006-2008 Soeren Sonnenburg              ***
 */

#include <shogun/base/SGObject.h>

#ifndef DOXYGEN_SHOULD_SKIP_THIS
namespace shogun
{
/** class QProblem */
class QPproblem
{
// ----------------- Public Data ---------------
public:
  /** chunk size */
  int32_t     chunk_size;
  /** ell */
  int32_t     ell;
  /** y */
  int32_t    *y;
  /** delta sv */
  float64_t DELTAsv;
  /** q */
  int32_t     q;
  /** max mw */
  int32_t     maxmw;
  /** c const */
  float64_t  c_const;
  /** bee */
  float64_t  bee;
  /** delta */
  float64_t  delta;
  /** linadd */
  bool linadd;

  /** kernel */
  sKernel* KER;
  /** kernel type */
  int32_t     ker_type;
  /** projection solver */
  int32_t     projection_solver;
  /** projection projector */
  int32_t     projection_projector;
  /** preprocess mode */
  int32_t     PreprocessMode;
  /** preprocess size */
  int32_t     preprocess_size;
  /** verbosity */
  int32_t     verbosity;
  /** tau proximal */
  float64_t  tau_proximal;
  /** objective value */
  float64_t objective_value;

// ----------------- Public Methods ---------------
  /** constructor */
  QPproblem ();
  ~QPproblem();

  /** read SVM file
   *
   * @param fInput input filename
   * @return an int
   */
  int32_t  ReadSVMFile    (char *fInput);

  /** read GPDT binary
   *
   * @param fName input filename
   * @return an int
   */
  int32_t  ReadGPDTBinary(char *fName);

  /** check if 2-class
   *
   * @return an int
   */
  int32_t  Check2Class    ();

  /** subproblem
   *
   * @param dst where to copy subproblem to
   * @param ker problem kernel
   * @param len length
   * @param perm perm
   */
  static void copy_subproblem(QPproblem* dst, QPproblem* ker, int32_t len, int32_t *perm);

  /** PrepMP */
  void PrepMP         ();

  /** solve gpdt
   *
   * @param solution
   * @return something floaty
   */
  float64_t  gpdtsolve      (float64_t *solution);

  /** solve pgpdt
   *
   * @param solution
   * @return something floaty
   */
  float64_t  pgpdtsolve     (float64_t *solution);

  /** check if lineadd is enabled
   *
   * @return if lineadd is enabled
   */
  inline bool get_linadd_enabled()
  {
    return linadd;
  }

  /** @return object name */
  virtual const char* get_name() const { return "QPproblem"; }

// ----------------- Private Data  ---------------
private:
  int32_t    dim;
  int32_t    *index_in, *index_out;
  int32_t    *ing, *inaux, *inold, *incom;
  int32_t    *cec;
  int32_t    nb;
  int32_t    *bmem, *bmemrid, *pbmr;
  int32_t    my_chunk_size;  // chunk_size for the current processor
  int32_t    my_spD_offset;  // offset of the current processor into sp_D matrix
  int32_t    recvl[32], displ[32];
  float64_t kktold;
  float64_t DELTAvpm, InitialDELTAvpm, DELTAkin;
  float64_t *alpha;
  float64_t *grad, *st;

// ----------------- Private Methods ---------------
private:
  int32_t  Preprocess0 (int32_t *aux, int32_t *sv);
  int32_t  Preprocess1 (sKernel* KER, int32_t *aux, int32_t *sv);
  int32_t  optimal     ();

  bool is_zero(int32_t  i) { return (alpha[i] < DELTAsv); }
  bool is_free(int32_t  i)
       { return (alpha[i] > DELTAsv && alpha[i] < (c_const - DELTAsv)); }
  bool is_bound(int32_t i) { return (alpha[i] > (c_const - DELTAsv)); }

};
}
#endif // DOXYGEN_SHOULD_SKIP_THIS