This file is indexed.

/usr/include/trilinos/AbstractLinAlgPack_MultiVectorMutable.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.

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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
// @HEADER
// ***********************************************************************
// 
// Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
//                  Copyright (2003) Sandia Corporation
// 
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S. Government.
// 
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//  
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//  
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
// Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
// 
// ***********************************************************************
// @HEADER

#ifndef ALAP_MULTI_VECTOR_MUTABLE_H
#define ALAP_MULTI_VECTOR_MUTABLE_H

#include "AbstractLinAlgPack_MultiVector.hpp"

namespace AbstractLinAlgPack {

/** \brief Interface for a collection of mutable vectors (multi-vector, matrix).
 *
 * This interface extends the \c MutiVector interface an allows mutable access to
 * the constituent vectors.
 *
 * These vectors allow the modification of the matrix row by row, column by column,
 * and/or diagonal by diagonal.  Each of the views is transient and should be used
 * and discarded quickly.
 *
 * Note that the underlying matrix is only guaranteed to be modified after the smart reference
 * counted pointer returned from these methods is destoryed.  For example, consider the following code:
 \code

 void f( MultiVectorMutable* M, index_type i )
 {
  MultiVectorMutable::vec_mut_ptr_t
      row_i =M->row(i);
  *row_i = 0.0;
  // The underlying matrix may not be modified at this point.
  row_i = NULL;
  // Now the underlying matrix is guaranteed to be modified and
  // we can assume this in the following code.
  ...
 }
 \endcode
 * Default implementations of the const access methods \c row() \c col()
 * and \c diag() from \c MultiVector call the non-const methods defined
 * here and cast the pointers.
 *
 * Many of the default implementations of the linear algebra operations in
 * \c MatrixOp and the other matrix interfaces rely on the left hand side
 * matrix objects supporting the \c MultiVectorMutable interface.
 */
class MultiVectorMutable : virtual public MultiVector {
public:
  
  /** \brief . */
  using MultiVector::col;
  /** \brief . */
  using MultiVector::row;
  /** \brief . */
  using MultiVector::diag;

  /** \brief . */
  typedef Teuchos::RCP<VectorMutable>       vec_mut_ptr_t;
  /** \brief . */
  typedef Teuchos::RCP<MultiVectorMutable>  multi_vec_mut_ptr_t;

  /** @name Clone */
  //@{

  /** \brief Clone the non-const multi-vector object.
   *
   * The default implementation creates a new multi-vector
   * and then copies the values.
   */
  virtual multi_vec_mut_ptr_t mv_clone();

  //@}

  /** @name Provide mutable row, column and/or diagonal access */
  //@{

  /** \brief Get a mutable column vector.
   *
   * Postconditions:<ul>
   * <li> [<tt>this->access_by() & COL_ACCESS</tt>] <tt>return.get() != NULL</tt>
   * <li> [<tt>return.get() != NULL</tt>] <tt>space_cols().is_compatible(return->space()) == true</tt>
   * </ul>
   *
   * ToDo: Finish documentation!
   */
  virtual vec_mut_ptr_t col(index_type j) = 0;
  /** \brief Get a mutable row vector.
   *
   * Postconditions:<ul>
   * <li> [<tt>this->access_by() & ROW_ACCESS</tt>] <tt>return.get() != NULL</tt>
   * <li> [<tt>return.get() != NULL</tt>] <tt>space_rows().is_compatible(return->space()) == true</tt>
   * </ul>
   *
   * ToDo: Finish documentation!
   */
  virtual vec_mut_ptr_t row(index_type i) = 0;
  /** \brief Get a mutable diagonal vector.
   *
   * Postconditions:<ul>
   * <li> [<tt>this->access_by() & DIAG_ACCESS</tt>] <tt>return.get() != NULL</tt>
   * </ul>
   *
   * ToDo: Finish documentation!
   */
  virtual vec_mut_ptr_t diag(int k) = 0;

  //@}

  /** @name Sub-view methods */
  //@{

  /** \brief Returns a mutable sub-view of the multi vector.
   *
   * ToDo: Finish documentation!
   *
   * The default implementation returns a \c MultiVectorMutableSubView object for
   * any valid arbitary sub-view.
   */
  virtual multi_vec_mut_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng);
  
  /** \brief Inlined implementation calls <tt>this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu))</tt>.
   */
  multi_vec_mut_ptr_t mv_sub_view(
    const index_type& rl, const index_type& ru
    ,const index_type& cl, const index_type& cu
    );

  //@}

  /** @name Overridden from MatrixOp */
  //@{

  /** \brief . */
  mat_mut_ptr_t clone();
  /** \brief . */
  void zero_out();
  /** \brief . */
  void Mt_S( value_type alpha );
  /** \brief . */
  MatrixOp& operator=(const MatrixOp& mwo_rhs);
  /** \brief . */
  bool Mp_StM(
    MatrixOp* mwo_lhs, value_type alpha
    ,BLAS_Cpp::Transp trans_rhs
    ) const;
  /** \brief . */
  bool Mp_StM(
    value_type alpha,const MatrixOp& M_rhs, BLAS_Cpp::Transp trans_rhs
    );

  //@}

  /** @name Overridden from MultiVector */
  //@{

  /** \brief . */
  multi_vec_ptr_t mv_clone() const;
  /** \brief . */
  vec_ptr_t col(index_type j) const;
  /** \brief . */
  vec_ptr_t row(index_type i) const;
  /** \brief . */
  vec_ptr_t diag(int k) const;
  /** \brief . */
  multi_vec_ptr_t mv_sub_view(const Range1D& row_rng, const Range1D& col_rng) const;

  //@}

}; // end class MultiVectorMutable

// //////////////////////////////////////////////////
// Inlined methods for MultiVector

inline
MultiVectorMutable::multi_vec_mut_ptr_t
MultiVectorMutable::mv_sub_view(
  const index_type& rl, const index_type& ru
  ,const index_type& cl, const index_type& cu
  )
{
  return this->mv_sub_view(Range1D(rl,ru),Range1D(cl,cu));
}

} // end namespace AbstractLinAlgPack

#endif // ALAP_MULTI_VECTOR_MUTABLE_H