mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-22 03:42:19 +00:00
Documentation update and some fixes.
This commit is contained in:
13
doc/samples/vector_binary_scalar.cpp
Normal file
13
doc/samples/vector_binary_scalar.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include <boost/numeric/ublas/vector.hpp>
|
||||
#include <boost/numeric/ublas/io.hpp>
|
||||
|
||||
int main () {
|
||||
using namespace boost::numeric::ublas;
|
||||
vector<double> v (3);
|
||||
for (unsigned i = 0; i < v.size (); ++ i)
|
||||
v (i) = i;
|
||||
|
||||
std::cout << 2.0 * v << std::endl;
|
||||
std::cout << v * 2.0 << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user