view src/armadillo-test.cpp @ 3578:583d3bf548e6

texinfo: update to 5.2 and install all tools * src/texinfo.mk: update to 5.2 and make/make install all. * src/texinfo-1-fixes.patch: updated patch for 5.2.
author John Donoghue <john.donoghue@ieee.org>
date Tue, 15 Apr 2014 21:32:17 -0400
parents 82d1044a4434
children
line wrap: on
line source

/*
 * This file is part of MXE.
 * See index.html for further information.
 */

#include <armadillo>

using namespace arma;

int main()
{
	mat A = randu<mat>(50,50);
	mat B = trans(A)*A;  // generate a symmetric matrix
	
	vec eigval;
	mat eigvec;
	
	// use standard algorithm by default
	eig_sym(eigval, eigvec, B);
	
	// use divide & conquer algorithm
	eig_sym(eigval, eigvec, B, "dc");
	return 0;
}