GithubHelp home page GithubHelp logo

standardgalactic / blockbandedmatrices.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from julialinearalgebra/blockbandedmatrices.jl

0.0 0.0 0.0 532 KB

A Julia package for representing block-banded matrices and banded-block-banded matrices

License: MIT License

Julia 100.00%

blockbandedmatrices.jl's Introduction

BlockBandedMatrices.jl

A Julia package for representing block-banded matrices and banded-block-banded matrices

Build Status codecov

This package supports representing block-banded and banded-block-banded matrices by only storing the entries in the non-zero bands.

A BlockBandedMatrix is a subtype of BlockMatrix of BlockArrays.jl whose layout of non-zero blocks is banded. We can construct a BlockBandedMatrix as follows:

l,u = 2,1          # block bandwidths
N = M = 4          # number of row/column blocks
cols = rows = 1:N  # block sizes

BlockBandedMatrix(Zeros(sum(rows),sum(cols)), rows,cols, (l,u)) # creates a block-banded matrix of zeros
BlockBandedMatrix(Ones(sum(rows),sum(cols)), rows,cols, (l,u)) # creates a block-banded matrix with ones in the non-zero entries
BlockBandedMatrix(I, rows,cols, (l,u))                          # creates a block-banded  identity matrix

A BandedBlockBandedMatrix has the added structure that the blocks themselves are banded, and conform to the banded matrix interface of BandedMatrices.jl. We can construct a BandedBlockBandedMatrix as follows:

l,u = 2,1          # block bandwidths
λ,μ = 1,2          # sub-block bandwidths: the bandwidths of each block
N = M = 4          # number of row/column blocks
cols = rows = 1:N  # block sizes
BandedBlockBandedMatrix(Zeros(sum(rows),sum(cols)), rows,cols, (l,u), (λ,μ)) # creates a banded-block-banded matrix of zeros
BandedBlockBandedMatrix(Ones(sum(rows),sum(cols)), rows,cols, (l,u), (λ,μ))  # creates a banded-block-banded matrix with ones in the non-zero entries
BandedBlockBandedMatrix(I, rows,cols, (l,u), (λ,μ))                          # creates a banded-block-banded identity matrix

blockbandedmatrices.jl's People

Contributors

briochemc avatar dlfivefifty avatar github-actions[bot] avatar jagot avatar juliatagbot avatar mdavezac avatar putianyi889 avatar snowball13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.