ViennaCL - The Vienna Computing Library  1.7.0
Free open-source GPU-accelerated linear algebra and solver library.
viennacl::unit_vector< NumericT > Struct Template Reference

Represents a vector consisting of 1 at a given index and zeros otherwise. More...

#include <vector_def.hpp>

Inheritance diagram for viennacl::unit_vector< NumericT >:
viennacl::implicit_vector_base< NumericT >

Public Member Functions

 unit_vector (vcl_size_t s, vcl_size_t ind, viennacl::context ctx=viennacl::context())
 
- Public Member Functions inherited from viennacl::implicit_vector_base< NumericT >
viennacl::context context () const
 
vcl_size_t size () const
 
cpu_value_type value () const
 
vcl_size_t index () const
 
bool has_index () const
 
cpu_value_type operator() (vcl_size_t i) const
 
cpu_value_type operator[] (vcl_size_t i) const
 

Additional Inherited Members

- Public Types inherited from viennacl::implicit_vector_base< NumericT >
typedef NumericT const & const_reference
 
typedef NumericT cpu_value_type
 
- Protected Member Functions inherited from viennacl::implicit_vector_base< NumericT >
 implicit_vector_base (vcl_size_t s, vcl_size_t i, NumericT v, viennacl::context ctx)
 
 implicit_vector_base (vcl_size_t s, NumericT v, viennacl::context ctx)
 
- Protected Attributes inherited from viennacl::implicit_vector_base< NumericT >
vcl_size_t size_
 
std::pair< bool, vcl_size_tindex_
 
NumericT value_
 
viennacl::context ctx_
 

Detailed Description

template<typename NumericT>
struct viennacl::unit_vector< NumericT >

Represents a vector consisting of 1 at a given index and zeros otherwise.

Definition at line 76 of file vector_def.hpp.

Constructor & Destructor Documentation

template<typename NumericT>
viennacl::unit_vector< NumericT >::unit_vector ( vcl_size_t  s,
vcl_size_t  ind,
viennacl::context  ctx = viennacl::context() 
)
inline

Definition at line 78 of file vector_def.hpp.


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