Selectors

Abstract Types

RLinearAlgebra.SelectorType
Selector

An abstract type containing user controlled parameters for a technique that selects indices from a matrix.

source
RLinearAlgebra.SelectorRecipeType
SelectorRecipe

An abstract type containing user controlled parameters and preallocated memory for a technique that selects indices from a matrix.

source

Selector Structures

RLinearAlgebra.LUPPType
LUPP <: Selector

A Selector that implements LU with partial pivoting for selecting column indices from a matrix.

Fields

  • compressor::Compressor, the compression technique that will be applied to the matrix, before selecting indices.

Constructor

LUPP(;compressor = Identity())

Keywords

  • compressor::Compressor, the compression technique that will be applied to the matrix, before selecting indices. Defaults to the Identity compressor.

Returns

  • A LUPP object.
Implementation Note

LU with partial pivoting is classically implemented to select rows of a matrix. Here we apply LU with partial pivoting to the transpose of the inputted matrix to select columns.

source
RLinearAlgebra.LUPPRecipeType
LUPPRecipe <: SelectorRecipe

A SelectorRecipe that contains all the necessary preallocations for selecting column indices from a matrix using LU with partial pivoting.

Fields

  • compressor::CompressorRecipe, the compression technique that will applied to the matrix, before selecting indices.
  • SA::AbstractMatrix, a buffer matrix for storing the sketched matrix.
Implementation Note

LU with partial pivoting is classically implemented to select rows of a matrix. Here we apply LU with partial pivoting to the transpose of the inputted matrix to select columns.

source

Exported Functions

RLinearAlgebra.complete_selectorFunction
complete_selector(selector::Selector, A::AbstractMatrix)

A function that generates a SelectorRecipe given arguments.

Arguments

  • selector::Selector, a data structure containing the user-defined parameters associated with a particular selection method.
  • A::AbstractMatrix, a target matrix for approximation.

Outputs

  • A SelectorRecipe object.
source
RLinearAlgebra.update_selector!Function
update_selector!(selector::SelectorRecipe)

A function that updates the SelectorRecipe in place given the arguments.

Arguments

  • selector::SelectorRecipe, a fully initialized realization for a selector method for a particular matrix.

Outputs

  • A SelectorRecipe object.
source
update_selector!(selector::SelectorRecipe, A::AbstractMatrix)

A function that updates the SelectorRecipe in place given the arguments.

Arguments

  • selector::SelectorRecipe, a fully initialized realization for a selector method for a particular matrix.
  • A::AbstractMatrix, a target matrix for approximation.

Outputs

  • A SelectorRecipe object.
source
RLinearAlgebra.select_indices!Function
select_indices!(
    idx::AbstractVector,
    selector::SelectorRecipe, 
    A::AbstractMatrix,
    n_idx::Int64, 
    start_idx::Int64
)

A function that selects indices from a matrix A using a specific SelectorRecipe. It updates the vector idx in place with n_idx new indices starting at index start_idx.

Arguments

  • idx::vector, a vector where selected indices will be placed.
  • selector::SelectorRecipe, a fully initialized realization for a selector method for a particular matrix.
  • A::AbstractMatrix, a target matrix for approximation.
  • n_idx::Int64, the number of indices to be selected.
  • start_idx::Int64. the starting location in idx where the indices will be placed.

Outputs

  • Returns nothing
source

Internal Functions