Giter Club home page Giter Club logo

bandedmatrices.jl's Introduction

BandedMatrices.jl

A Julia package for representing banded matrices

Build Status

This package supports representing banded matrices by only the entries on the bands.

One can create banded matrices of type BandedMatrix as follows:

bzeros(m,n,l,u)    # creates a banded matrix of zeros, with l sub-diagonals and u super-diagonals
brand(m,n,l,u)     # creates a random banded matrix, with l sub-diagonals and u super-diagonals
bones(m,n,l,u)     # creates a banded matrix of ones, with l sub-diagonals and u super-diagonals
beye(n,l,u)        # creates a banded  n x n identity matrix, with l sub-diagonals and u super-diagonals

Specialized algebra routines are overriden, include * and \:

A = brand(10000,10000,4,3)  # creates a 10000 x 10000 matrix with 4 sub-diagonals
                            # and 3 super-diagonals
b = randn(10000)
A*b  #   Calls optimized matrix*vector routine
A*A  #   Calls optimized matrix*matrix routine
A\b  #   Calls optimized matrix\vector routine

Implementation

Currently, only column-major ordering is supported: a banded matrix B

[ a_11 a_12
  a_21 a_22 a_23
  a_31 a_32 a_33 a_34
       a_42 a_43 a_44  ]

is represented as a BandedMatrix with a field B.data representing the matrix as

[ *     a_12   a_23    a_34
 a_11   a_22   a_33    a_43
 a_21   a_32   a_43    *
 a_31   a_42   *       *       ]

B.l gives the number of subdiagonals (2) and B.u gives the number of super-diagonals (1). Both B.l and B.u must be non-negative at the moment.

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.