~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to extern/Eigen3/Eigen/src/Core/CwiseNullaryOp.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
//
4
4
// Copyright (C) 2008-2010 Gael Guennebaud <gael.guennebaud@inria.fr>
5
5
//
6
 
// Eigen is free software; you can redistribute it and/or
7
 
// modify it under the terms of the GNU Lesser General Public
8
 
// License as published by the Free Software Foundation; either
9
 
// version 3 of the License, or (at your option) any later version.
10
 
//
11
 
// Alternatively, you can redistribute it and/or
12
 
// modify it under the terms of the GNU General Public License as
13
 
// published by the Free Software Foundation; either version 2 of
14
 
// the License, or (at your option) any later version.
15
 
//
16
 
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
17
 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
 
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
19
 
// GNU General Public License for more details.
20
 
//
21
 
// You should have received a copy of the GNU Lesser General Public
22
 
// License and a copy of the GNU General Public License along with
23
 
// Eigen. If not, see <http://www.gnu.org/licenses/>.
 
6
// This Source Code Form is subject to the terms of the Mozilla
 
7
// Public License v. 2.0. If a copy of the MPL was not distributed
 
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
24
9
 
25
10
#ifndef EIGEN_CWISE_NULLARY_OP_H
26
11
#define EIGEN_CWISE_NULLARY_OP_H
27
12
 
 
13
namespace Eigen {
 
14
 
28
15
/** \class CwiseNullaryOp
29
16
  * \ingroup Core_Module
30
17
  *
101
88
      return m_functor.packetOp(index);
102
89
    }
103
90
 
 
91
    /** \returns the functor representing the nullary operation */
 
92
    const NullaryOp& functor() const { return m_functor; }
 
93
 
104
94
  protected:
105
95
    const internal::variable_if_dynamic<Index, RowsAtCompileTime> m_rows;
106
96
    const internal::variable_if_dynamic<Index, ColsAtCompileTime> m_cols;
238
228
  * assumed to be a(0), a(1), ..., a(size). This assumption allows for better vectorization
239
229
  * and yields faster code than the random access version.
240
230
  *
 
231
  * When size is set to 1, a vector of length 1 containing 'high' is returned.
 
232
  *
241
233
  * \only_for_vectors
242
234
  *
243
235
  * Example: \include DenseBase_LinSpaced_seq.cpp
270
262
  * \brief Sets a linearly space vector.
271
263
  *
272
264
  * The function generates 'size' equally spaced values in the closed interval [low,high].
 
265
  * When size is set to 1, a vector of length 1 containing 'high' is returned.
273
266
  *
274
267
  * \only_for_vectors
275
268
  *
381
374
  * \brief Sets a linearly space vector.
382
375
  *
383
376
  * The function generates 'size' equally spaced values in the closed interval [low,high].
 
377
  * When size is set to 1, a vector of length 1 containing 'high' is returned.
384
378
  *
385
379
  * \only_for_vectors
386
380
  *
396
390
  return derived() = Derived::NullaryExpr(size, internal::linspaced_op<Scalar,false>(low,high,size));
397
391
}
398
392
 
 
393
/**
 
394
  * \brief Sets a linearly space vector.
 
395
  *
 
396
  * The function fill *this with equally spaced values in the closed interval [low,high].
 
397
  * When size is set to 1, a vector of length 1 containing 'high' is returned.
 
398
  *
 
399
  * \only_for_vectors
 
400
  *
 
401
  * \sa setLinSpaced(Index, const Scalar&, const Scalar&), CwiseNullaryOp
 
402
  */
 
403
template<typename Derived>
 
404
EIGEN_STRONG_INLINE Derived& DenseBase<Derived>::setLinSpaced(const Scalar& low, const Scalar& high)
 
405
{
 
406
  EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)
 
407
  return setLinSpaced(size(), low, high);
 
408
}
 
409
 
399
410
// zero:
400
411
 
401
412
/** \returns an expression of a zero matrix.
848
859
EIGEN_STRONG_INLINE const typename MatrixBase<Derived>::BasisReturnType MatrixBase<Derived>::UnitW()
849
860
{ return Derived::Unit(3); }
850
861
 
 
862
} // end namespace Eigen
 
863
 
851
864
#endif // EIGEN_CWISE_NULLARY_OP_H