Home > tt2 > @tt_tensor > tt_save.m

tt_save

PURPOSE ^

Saves TT-tensors into a Fortran-readable SDV format

SYNOPSIS ^

function [mem] = tt_save(filename, tt, precision)

DESCRIPTION ^

Saves TT-tensors into a Fortran-readable SDV format
   [MEM] = TT_SAVE(FILENAME, TT, [PRECISION]) Saves a TT-tensor  to a 
   filename in SDV =) format, precision: 0 - double, 1 - single  returns 
   the bytes written to a file, -1 in case of errors.


 TT-Toolbox 2.2, 2009-2012

This is TT Toolbox, written by Ivan Oseledets et al.
Institute of Numerical Mathematics, Moscow, Russia
webpage: http://spring.inm.ras.ru/osel

For all questions, bugs and suggestions please mail
ivan.oseledets@gmail.com
---------------------------

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [mem] = tt_save(filename, tt, precision)
0002 %Saves TT-tensors into a Fortran-readable SDV format
0003 %   [MEM] = TT_SAVE(FILENAME, TT, [PRECISION]) Saves a TT-tensor  to a
0004 %   filename in SDV =) format, precision: 0 - double, 1 - single  returns
0005 %   the bytes written to a file, -1 in case of errors.
0006 %
0007 %
0008 % TT-Toolbox 2.2, 2009-2012
0009 %
0010 %This is TT Toolbox, written by Ivan Oseledets et al.
0011 %Institute of Numerical Mathematics, Moscow, Russia
0012 %webpage: http://spring.inm.ras.ru/osel
0013 %
0014 %For all questions, bugs and suggestions please mail
0015 %ivan.oseledets@gmail.com
0016 %---------------------------
0017 
0018 if (nargin<3)||(isempty(precision))
0019     precision = 0; % double
0020 end;
0021 
0022 mem = tt_write(filename, tt.d, tt.r, tt.n, tt.core, precision);
0023 
0024 end

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