Git Product home page Git Product logo

multicriteriasort.jl's Introduction

MultiCriteriaSort

Build Status

This is package extends the capabilities of the sorting functions to sort entire matrices on a set of columns/rows that are defined in set terms of descending priority.

New Sorting Methods

The sort!, sort and sortperm functions may be provided with an additional argument, keys::Vector{Int}, when provided with a AbstractMatrix to sort. The keys are an array of column or row indices that define which indices to sort on in descending order of priorty.

To sort a matrices rows using columns 1, 2 and 3 to sort:

a = [1 3 2; 1 2 3; 1 1 1; 3 4 4; 3 4 1; 3 4 2]
sort(a, [1:3])

Similarly to get the row permutation to sort the matrix use sortperm(a, [1:3]).

Each function is given an optional dim::Int argument which defines which dimension to sort (i.e. 1 = sort rows by values in given columns and 2 = sort columns by values in given rows). To sort the columns in matrix a by rows 1 and 2 use sort(a, [1,2], dim = 2).

multicriteriasort.jl's People

Contributors

dwil avatar sbchisholm avatar

Watchers

David Wolfe avatar James Cloos avatar Ben MacLeod avatar Jason McGillivray avatar  avatar  avatar Adrian Bentley avatar Scott MacDonald avatar  avatar Igor avatar  avatar Jeel Shah avatar Brad MacPhee avatar Charlie Gerrie avatar Jinyi avatar  avatar Vlad avatar Krystian Dudzinski avatar Baifan Hu avatar Deana Hall avatar Brian avatar Martin Bruchanov avatar Alex Ai avatar Abraham Shaishaa avatar  avatar Amelia Stead avatar Ilya Tokarev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.