Skip to content

Ashutosh-Mishra21/Blas_2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

BLAS_2 Matrix-Vector Operations

This Python code provides a class BLAS_2 for performing various matrix-vector operations, including matrix-vector multiplication, symmetric matrix-vector multiplication, triangular matrix-vector multiplication, and more.

Table of Contents

Introduction

This Python code defines a class BLAS_2 that allows users to perform common linear algebra operations involving matrices and vectors. It includes functionality for both regular and symmetric matrices and supports operations with single and double precision.

Features

  • Matrix-vector multiplication
  • Symmetric matrix-vector multiplication
  • Triangular matrix-vector multiplication
  • Triangular banded matrix-vector multiplication
  • Rank-1 operation
  • Symmetric rank-1 operation
  • Symmetric rank-2 operation
  • Support for single and double precision
  • User-friendly input prompts

How to Use

  1. Import the numpy library:

    import numpy as np
    

Create an instance of the BLAS_2 class by specifying the number of rows, columns, alpha value, and matrix A: blas = BLAS_2(rows, cols, alpha, A)

Matrix-Vector Multiplication

blas.matrix_vector()

Symmetric Matrix-Vector Multiplication

blas.symmetric_matrix_vector()

Triangular Matrix-Vector Multiplication

blas.triangular_matrix_vector()

Triangular Banded Matrix-Vector Multiplication

blas.triangular_banded_matrix_vector()

Rank-1 Operation

blas.Rank_1_operation()

Symmetric Rank-1 Operation

blas.symmetric_rank1_operation()

Symmetric Rank-2 Operation

blas.symmetric_rank2_operation()

About

College Blas -2 project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages