Code Monkey home page Code Monkey logo

fortran-search-and-sort's Introduction

Status

GitHub release CI Status codecov

Description

Basic sorting and searching routines for vectors.

Supports integer & real vectors, and vectors extended from the abstract item class.

Includes the routines:

  • function unique(vec)
  • function binary_search(val,vec)
  • subroutine sort_ascending(vec)
  • subroutine sort_descending(vec)

Compiling

The library and test program will build with any modern Fortran compiler. A Fortran Package Manager manifest file (fpm.toml) is included, so that the library and tests cases can be compiled with FPM. For example:

fpm build --profile release
fpm test --profile release

To use fortran-search-and-sort within your FPM project, add the following to your fpm.toml file:

[dependencies]
fortran-search-and-sort = { git="https://github.com/jacobwilliams/fortran-search-and-sort.git" }

To generate the documentation using ford, run:

ford ford.md

Documentation

The latest API documentation can be found here. This was generated from the source code using FORD.

See also

fortran-search-and-sort's People

Contributors

jacobwilliams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

trimtrim

fortran-search-and-sort's Issues

Does not compile with gfortran

Hi there,

gfortran compilation fails with "gfortran -c -O2 -std=f2008" as given in build.sh. First error:

src/sorting_module.f90:31:54:

         pure elemental subroutine assign_equal_func(v1,v2)
                                                      1
Error: INTENT(OUT) argument ‘v1’ of pure procedure ‘assign_equal_func’ at (1) may not be polymorphic
item_routines.inc:16:46

followed by a lot of

sort_descending.inc:54.48:
    Included at real64_routines.inc:33:
    Included at src/sorting_module.f90:127:

        call swap(vec(ilow),vec((ilow+ihigh)/2))
                                                1
Error: There is no specific subroutine for the generic 'swap' at (1)

Note that I get the latter error as well with the default intel compiler "ifort -c -O2 -warn -stand f15 -traceback"

Best,
Chris

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.