forsvd Module


Uses

    • kinds
  • module~~forsvd~~UsesGraph module~forsvd forsvd kinds kinds module~forsvd->kinds

Used by

  • module~~forsvd~~UsedByGraph module~forsvd forsvd program~benchmark benchmark program~benchmark->module~forsvd program~test1 test1 program~test1->module~forsvd program~test2 test2 program~test2->module~forsvd program~test3 test3 program~test3->module~forsvd program~test4 test4 program~test4->module~forsvd program~test5 test5 program~test5->module~forsvd

Interfaces

public interface svd

  • private pure subroutine svd_rel(A, U, S, VT, method)

    Author
    Seyed Ali Ghasemi

    Calculates the singular value decomposition (SVD) of a matrix A.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=rk), intent(in), dimension(:, :), contiguous :: A
    real(kind=rk), intent(out), dimension(:,:) :: U
    real(kind=rk), intent(out), dimension(:) :: S
    real(kind=rk), intent(out), dimension(:,:) :: VT
    character(len=*), intent(in), optional :: method

Derived Types

type, public ::  tsvd

Components

Type Visibility Attributes Name Initial
real(kind=rk), public, dimension(:,:), allocatable :: matrix
real(kind=rk), public, dimension(:,:), allocatable :: matrix_app
integer, public :: nrow
integer, public :: ncol
integer, public :: rank

Type-Bound Procedures

procedure, public :: lowrank
procedure, public :: dlloc => deallocate_tsvd

type, public ::  pixel

Components

Type Visibility Attributes Name Initial
character(len=256), public :: image_name
character(len=256), public :: file_name
real(kind=rk), public, dimension(:,:), allocatable :: pixels
real(kind=rk), public, dimension(:,:), allocatable :: pixels_app
integer, public :: nrow
integer, public :: ncol
integer, public :: rank

Type-Bound Procedures

procedure, public :: image_to_pixels
procedure, public :: load_pixels
procedure, public :: compress_pixels
procedure, public :: save_pixels
procedure, public :: pixels_to_image
procedure, public :: dlloc => deallocate_pixel

Subroutines

private pure subroutine svd_rel(A, U, S, VT, method)

Author
Seyed Ali Ghasemi

Calculates the singular value decomposition (SVD) of a matrix A.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A
real(kind=rk), intent(out), dimension(:,:) :: U
real(kind=rk), intent(out), dimension(:) :: S
real(kind=rk), intent(out), dimension(:,:) :: VT
character(len=*), intent(in), optional :: method

private pure subroutine gesvd_rel(A, U, S, VT)

Author
Seyed Ali Ghasemi

Calculates the singular value decomposition (SVD) of a matrix A.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A
real(kind=rk), intent(out), dimension(:,:) :: U
real(kind=rk), intent(out), dimension(:) :: S
real(kind=rk), intent(out), dimension(:,:) :: VT

private pure subroutine gesdd_rel(A, U, S, VT)

Author
Seyed Ali Ghasemi

Calculates the singular value decomposition (SVD) of a matrix A.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in), dimension(:, :), contiguous :: A
real(kind=rk), intent(out), dimension(:,:) :: U
real(kind=rk), intent(out), dimension(:) :: S
real(kind=rk), intent(out), dimension(:,:) :: VT

private pure subroutine lowrank(this, matrix, rank, method)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tsvd), intent(inout) :: this
real(kind=rk), intent(in), dimension(:, :) :: matrix
integer, intent(in) :: rank
character(len=*), intent(in), optional :: method

private impure subroutine image_to_pixels(this, image_name, file_name)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this
character(len=*), intent(in) :: image_name
character(len=*), intent(in) :: file_name

private impure subroutine pixels_to_image(this, file_name, image_name)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this
character(len=*), intent(in) :: file_name
character(len=*), intent(in) :: image_name

private impure subroutine load_pixels(this, file_name)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this
character(len=*), intent(in) :: file_name

private pure subroutine compress_pixels(this, rank, method)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this
integer, intent(in) :: rank
character(len=*), intent(in), optional :: method

private impure subroutine save_pixels(this, file_name)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this
character(len=*), intent(in) :: file_name

private pure elemental subroutine deallocate_pixel(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(pixel), intent(inout) :: this

private pure elemental subroutine deallocate_tsvd(this)

Author
Seyed Ali Ghasemi

Arguments

Type IntentOptional Attributes Name
class(tsvd), intent(inout) :: this