Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
calculate-givens-rotation
Advanced tools
Readme
Compute the components of a Givens rotation matrix in order to zero an element
This module implements Algorithm 5.1.3 of Golub and Van Loan's Matrix Computations, 4th Edition. The goal is to calculate the components of a rotation matrix that, when applied to vector [a,b]^T
, will zero out the second component.
[ c s ] T [ a ] [ r ]
[ ] * [ ] = [ ]
[ -s c ] [ b ] [ 0 ]
Note that it also applies to the transposed case,
[ c s ]
[ a b ] * [ ] = [ r 0 ]
[ -s c ]
Sample usage:
var givens = require('calculate-givens-rotation')
var cs = givens(1,2) // --> cs = [ -0.4472135954999579, 0.8944271909999159 ]
// Alternate form:
var output = []
givens( 1, 2, output ) // --> output = [ -0.4472135954999579, 0.8944271909999159 ]
$ npm install calculate-givens-rotation
require('calculate-givens-rotation')( a, b )
Given two elements of a vector, compute the rotation matrix that zeros the second element.
a
,b
: the elements of the vector. b
is the element to be zeroed.Returns a two-element list [c,s]
containing c and s as defined above.
require('calculate-givens-rotation')( a, b, output )
An alternate form that passes output values through array output
a
,b
: as specified previouslyoutput
: an array that receives the output values, output[0] = c
and output[1] = s
Returns output
(c) 2015 Ricky Reusser. MIT License
FAQs
Compute the components of a Givens rotation matrix in order to zero an element
The npm package calculate-givens-rotation receives a total of 2 weekly downloads. As such, calculate-givens-rotation popularity was classified as not popular.
We found that calculate-givens-rotation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.