fave77 / Mathball

A JavaScript library for Competitive Programming
https://fave77.github.io/Mathball-Docs/
MIT License
99 stars 49 forks source link

Added sort() function and transpose() in Matrix class #155

Closed sakshichahal53 closed 5 years ago

sakshichahal53 commented 5 years ago

Do the checklist before submitting the PR:

Q: What version of Node.js you've used in the project? (e.g. Node v10.11.0) A: v 8.15.0

Q: Mention the Issue Number! (e.g. Fixed #8) A: 152

Sort a matrix [2-D array] can be called as : let obj = new M.Matrix(a); //here a is a 2-D array console.log(obj.sort('row'));

Transpose of a matrix can be called as: console.log(obj.transpose());

codecov-io commented 5 years ago

Codecov Report

Merging #155 into master will decrease coverage by 1.88%. The diff coverage is 7.4%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #155      +/-   ##
==========================================
- Coverage     100%   98.11%   -1.89%     
==========================================
  Files          77       78       +1     
  Lines        1301     1328      +27     
==========================================
+ Hits         1301     1303       +2     
- Misses          0       25      +25
Impacted Files Coverage Δ
src/validation/matrix-sort-type.js 33.33% <33.33%> (ø)
src/Matrix/index.js 72.28% <4.16%> (-27.72%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6a44802...018ee71. Read the comment docs.