ViennaCL - The Vienna Computing Library  1.7.1
Free open-source GPU-accelerated linear algebra and solver library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::identity_matrix< NumericT > Class Template Reference

Represents a vector consisting of 1 at a given index and zeros otherwise. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only. More...

#include <matrix_def.hpp>

Inheritance diagram for viennacl::identity_matrix< NumericT >:
viennacl::implicit_matrix_base< NumericT >

Public Types

typedef vcl_size_t size_type
 
typedef NumericT const & const_reference
 
- Public Types inherited from viennacl::implicit_matrix_base< NumericT >
typedef NumericT const & const_reference
 
typedef NumericT cpu_value_type
 

Public Member Functions

 identity_matrix (size_type s, viennacl::context ctx=viennacl::context())
 
- Public Member Functions inherited from viennacl::implicit_matrix_base< NumericT >
size_type size1 () const
 
size_type size2 () const
 
viennacl::context context () const
 
NumericT value () const
 
bool diag () const
 
const_reference operator() (size_type i, size_type j) const
 

Additional Inherited Members

- Protected Types inherited from viennacl::implicit_matrix_base< NumericT >
typedef vcl_size_t size_type
 
- Protected Member Functions inherited from viennacl::implicit_matrix_base< NumericT >
 implicit_matrix_base (size_type size1, size_type size2, NumericT value, bool diag, viennacl::context ctx)
 
- Protected Attributes inherited from viennacl::implicit_matrix_base< NumericT >
size_type size1_
 
size_type size2_
 
NumericT value_
 
bool diag_
 
NumericT off_diag_
 
viennacl::context ctx_
 

Detailed Description

template<typename NumericT>
class viennacl::identity_matrix< NumericT >

Represents a vector consisting of 1 at a given index and zeros otherwise. To be used as an initializer for viennacl::vector, vector_range, or vector_slize only.

Examples:
blas2.cpp, and tql2.cpp.

Definition at line 69 of file matrix_def.hpp.

Member Typedef Documentation

template<typename NumericT>
typedef NumericT const& viennacl::identity_matrix< NumericT >::const_reference

Definition at line 73 of file matrix_def.hpp.

template<typename NumericT>
typedef vcl_size_t viennacl::identity_matrix< NumericT >::size_type

Definition at line 72 of file matrix_def.hpp.

Constructor & Destructor Documentation

template<typename NumericT>
viennacl::identity_matrix< NumericT >::identity_matrix ( size_type  s,
viennacl::context  ctx = viennacl::context() 
)
inline

Definition at line 75 of file matrix_def.hpp.


The documentation for this class was generated from the following file: