Fortran Template Library

A new repo that looks interesting is

Fortran Template Library (FTL): object-oriented implementation of generic containers similar to the C++ STL (Standard Template Library), by Fran Martinez Fadrique. Not all elements present in STL are implemented in FTL, yet the documentation in http://www.cplusplus.com/reference/stl/ can be used as generic conceptual reference.

I have created a category Containers and Generic Programming in my list, moving some repos from the overly broad General Purpose category. It has some overlap with the Data types and containers section of the fortran-lang package index.

Containers and Generic Programming

fdict: native Fortran 90 dictionary with hash tables for retaining any data-type in a Python-like dictionary, by Nick Papior

fhash: hash table with support for generic keys and values, by Laurence Kedward

ffhash: generic and fast hash table similar to khash in C, by Jannis Teunissen

fh_table: modern Fortran hash functions and hash tables, by dbartilson

Fortran Implementation of Abstract Types (FIAT): aims to implement various common data structures in Fortran, by Chris MacMackin and gitter-badger. These will be implemented in a generic manner using a container type. This was originally developed in PolyCon but has since been folded into FIAT, with some improvements.

flist: modern Fortran linked lists using unlimited polymorphic derived types, by Jacob Williams

Fortran-Linked-List: linked list module for stdlib of fortran-lang, by ChetanKarwa

fortran-list: generic list implementation in Fortran 2003, by Vladimír Fuka. Uses unlimited polymorphics or parametric polymorphism.

Fortran Parameter List (FPL): Fortran 2003 library that can manage the parameters of a program from a single point, by victorsndvg. FPL is an extendible container (dictionary) of <Key, Value> pairs, where the Key is a character string and the Value can be, by the default, of the basic data types.

Fortran Template Library (FTL): generic containers, versatile algorithms, easy string manipulation, and more, by Robert Rüger and Tomáš Trnka. It is heavily inspired by C++'s standard library, especially the part that is commonly referred to as the Standard Template Library (STL).

Fortran Template Library (FTL): object-oriented implementation of generic containers similar to the C++ STL (Standard Template Library), by Fran Martinez Fadrique. Not all elements present in STL are implemented in FTL, yet the documentation in http://www.cplusplus.com/reference/stl/ can be used as generic conceptual reference.

fstack: custom stack type for Fortran 2003 that implements a C-style stack, by jake-87. The advantage of this model is that one can have multiple stacks at any one time, so there is no need to juggle them – just allocate another one.

FTObjectLibrary: provides a collection of reference counted Fortran 2003 classes to facilitate writing generic object oriented Fortran programs, by David A. Kopriva et al.

gFTL: provides a mechanism to easily create robust containers and associated iterators which can be used within Fortran applications, from Goddard-Fortran-Ecosystem. The primary methods are intended to be as close to their C++ STL analogs as possible. Also see gFTL-shared

LinkedList: simple implementation of heterogeneous linked list in a single module, by Pedro Ricardo C. Souza

LinkedList: doubly linked list for Fortran 2003, by Tomohiro Degawa. The list is based on object-oriented programming, so the list can treat all types Fortran supports, including integer, real, character and derived types by using the unlimited polymorphism feature.

M_hashkeys: collection of hash key generator modules, by urbanjost

PolyCon: abstract container derived type which can be used as a sort of unlimited polymorphic entity whose contents are retrievable with type-guards, by Chris MacMackin. Different subclasses are created in order to hold different data-types.

qContainers: container library for Fortran language. It enables one to store any internal Fortran data type and any derived data type to the container. It implements containers for key/value pairs: tree table and hash table, and containers for objects: list and vector.

VectorClass: Fortran 2003 dynamic memory array that functions similarly (but not identically) to the C++ Vector class, by Tyler Chang

6 Likes

If nothing else, it shows the subject is definitely of interest to Fortran programmers :).

Thanks for this overview.

Wow. we apparently have an abundance of riches when it comes to container classes and classic Abstract Data Types. Makes me wonder why some on the standard committee appear to think that developing a standard STL like library is a task requiring a level of effort matching the Apollo program :smile: At least we went to the moon in less than 10 years. I expect getting a working template/generics facility will take at least 20.

2 Likes

Hopefully fewer if people participate in GitHub - j3-fortran/generics.

1 Like