mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-27 05:22:10 +00:00
Documentation update and some fixes.
svn path=/trunk/boost/libs/numeric/ublas/; revision=17184
This commit is contained in:
17
doc/samples/vector_unary.cpp
Normal file
17
doc/samples/vector_unary.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <boost/numeric/ublas/vector.hpp>
|
||||
#include <boost/numeric/ublas/io.hpp>
|
||||
|
||||
int main () {
|
||||
using namespace boost::numeric::ublas;
|
||||
vector<std::complex<double> > v (3);
|
||||
for (unsigned i = 0; i < v.size (); ++ i)
|
||||
v (i) = std::complex<double> (i, i);
|
||||
|
||||
std::cout << - v << std::endl;
|
||||
std::cout << conj (v) << std::endl;
|
||||
std::cout << real (v) << std::endl;
|
||||
std::cout << imag (v) << std::endl;
|
||||
std::cout << trans (v) << std::endl;
|
||||
std::cout << herm (v) << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user