[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: solving triadiagonal (and banded in general) systems of linear equat
From: |
Sergei Steshenko |
Subject: |
Re: solving triadiagonal (and banded in general) systems of linear equations |
Date: |
Thu, 27 Sep 2012 12:04:19 -0700 (PDT) |
--- On Thu, 9/27/12, Jordi Gutiérrez Hermoso <address@hidden> wrote:
> From: Jordi Gutiérrez Hermoso <address@hidden>
> Subject: Re: solving triadiagonal (and banded in general) systems of linear
> equations
> To: "Sergei Steshenko" <address@hidden>
> Cc: "Octave users list" <address@hidden>
> Date: Thursday, September 27, 2012, 6:12 AM
> On 26 September 2012 18:48, Sergei
> Steshenko <address@hidden>
> wrote:
>
> > So, do I understand it correctly, that I simply need to
> provide
> > matrix to the solver, and it will detect automatically
> that the
> > matrix is banded and choose the most optimal algorithm
> ?
>
>
> http://hg.savannah.gnu.org/hgweb/octave/file/46dd555edd33/liboctave/array/MatrixType.cc#l268
>
> Note that the argument for this function is a sparse matrix,
> so the
> check only occurs for sparse matrices. For full matrices the
> check is
>
>
> http://hg.savannah.gnu.org/hgweb/octave/file/46dd555edd33/liboctave/array/MatrixType.cc#l60
>
> only upper, lower, and hermitian matrices. No bandedness is
> checked if
> the matrix isn't of sparse type. This is consistent with
> the
> documentation:
>
> octave:1> x = toeplitz ([1 2 0 0 0 0]); y =
> toeplitz ([1 2 3 0 0 0]);
> octave:2> matrix_type (x), matrix_type (y)
> ans = Full
> ans = Full
> octave:3> matrix_type (sparse (x)),
> matrix_type (sparse (y))
> ans = Tridiagonal
> ans = Banded
>
> HTH,
> - Jordi G. H.
>
So, can I explicitly specify type (banded) of traditional (not sparse) matrix ?
If yes, will it improve performance ?
Thanks,
Sergei.