Home > tt2 > tests > test_dmrg_cross.m

test_dmrg_cross

PURPOSE ^

Simple script to test the stabilized dmrg-cross method

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

Simple script to test the stabilized dmrg-cross method

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %Simple script to test the stabilized dmrg-cross method
0002 
0003 d=10;
0004 %fun = @(ind) (sum(ind)+1i*ind(1));
0005 a=10;
0006 n=2^d; h=2*a/(n-1);
0007 x=-a:h:a;
0008 f=exp(-10*x.^2); f=tt_tensor(reshape(f,2*ones(1,d)),1e-9);
0009 fun = @(ind) f(ind);
0010 %fun = @(ind) 1;
0011 %n=2:d+1;
0012 n=2;
0013 %y=tt_ones(n);
0014 %r=ones(d+1,1);
0015 %r(2:d-1)=2:d-1;
0016 %y=tt_rand(n,d,r);
0017 %fun = @(ind) y(ind);
0018 tt=dmrg_cross(d,n,fun,1e-7,'nswp',20);

Generated on Wed 08-Feb-2012 18:20:24 by m2html © 2005