Coder Social home page Coder Social logo

tmbfuns's Introduction

tmbFuns

A repository for my TMB function libraries. Part of my push to refactor my workflow to a more efficient state.

I hope these functions are useful beyond my own work. Feel free to suggest functions, or to fork and golf my code. Submit a pull request, I'd love to see this grow from community involvement.

The main thing I ask if you're golfing my code is that you refrain from changing function inputs and outputs (including side effects - I know, poor functional style), as this will create errors in my work where I apply these functions. Of course, I'm open to suggestion and discussion on all parts of this repo, so if you feel strongly about changing the function I/O start an issue.

How to use

Add an #include statement to the top of the *.cpp file containing your TMB model. For example, to include the stockAssessmentFuns.hpp library:

#include "<path-to>/tmbFuns/stockAssessmentFuns.hpp"

where <path-to> is replaced with the actual file path.

Alternatively, you can copy your library file to your working directory, and use the statement

#include "stockAssessmentFuns.hpp"

I don't recommend the second approach, though, as it will not update when or if you update the repository version of the library. This will potentially lead to multiple conflicting version across your system, which is the exact kind of behaviour this repository was created to avoid. As long as the function inputs and outputs for a function remain the same, a centralised library is a better option.

Adding tmbFuns/ to compiler's include path

There is a way to add tmbFuns to the default include path for your compiler. If you use GCC, there is a stack-exchange post here. Although it looks like it's as simple as updating the paths in your base profile, I haven't attempted this. The reason is that I control my TMB models from an R script, so I anticipate some fussing with how R loads the bash environment.

tmbfuns's People

Contributors

samueldnj avatar

Watchers

 avatar  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.