mirror of
https://github.com/boostorg/ublas.git
synced 2026-02-22 15:52:18 +00:00
16 lines
412 B
C++
16 lines
412 B
C++
#include <boost/numeric/ublas/vector.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 << sum (v) << std::endl;
|
|
std::cout << norm_1 (v) << std::endl;
|
|
std::cout << norm_2 (v) << std::endl;
|
|
std::cout << norm_inf (v) << std::endl;
|
|
std::cout << index_norm_inf (v) << std::endl;
|
|
}
|
|
|