Skip to content

Commit

Permalink
post merge fixes to README and RSrandom
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoPannetier committed Apr 17, 2024
1 parent 43c3046 commit d5c8623
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RangeShifter is distributed with three user interfaces, each living in their own

All three share the same source code for the core simulation (i.e., the actual model), which lives in this repo (RScore). Each of the interfaces keeps a copy of this core code in a subfolder called RScore, kept in sync with the RScore repo via a git subtree (see Git subtree usage section).

⚠️ If you wish to propose a change to one of the interfaces, please do so in the corresponding repo: [RangeShifter batch mode](https://github.com/RangeShifter/RangeShifter_batch_dev), [RangeShiftR package](https://github.com/RangeShifter/RangeShiftR-package-dev).
If you wish to propose a change to one of the interfaces, please do so in the corresponding repo: [RangeShifter batch mode](https://github.com/RangeShifter/RangeShifter_batch_dev), [RangeShiftR package](https://github.com/RangeShifter/RangeShiftR-package-dev).

*The RangeShifter GUI is currently being rewritten, and is not open source yet.

Expand All @@ -40,13 +40,10 @@ Anyone who whishes to make changes to RangeShifter's code, including regular dev

## Branching policy

<<<<<<<< HEAD:src/RScore/CONTRIBUTING.md
![](branches.png)

*Check out the [Git cheatsheet](https://github.com/RangeShifter/RScore/blob/main/git_cheatsheet.md) for a reminder on the main git commands*

========
>>>>>>>> develop:CONTRIBUTING.md
This policy applies to RScore and all three RangeShifter interfaces.
RangeShifter uses the following branching structure:

Expand Down Expand Up @@ -87,5 +84,3 @@ Please get in touch with the RangeShifter development team (rangeshiftr@uni-pots
Alternatively, proceed as with the bug fix above: create your own branch or fork _from `develop`_ and work from there, and submit a pull request when your new features are ready to join the core code.
We recommend that you update your branch regularly to new changes on `develop` (using `git merge develop`) to reduce the risk of merge conflicts or your version getting out-of-touch in the late stages of development.
We also recommend that you work in small commits, as this makes the code easier to debug, and makes it easier for maintainers to understand your contributions when reviewing a pull request.

*Do we welcome independent contributions?
2 changes: 2 additions & 0 deletions RSrandom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ float RSrandom::FRandom(float min, float max) {
}

int RSrandom::Bernoulli(double p) {
if (p < 0) throw runtime_error("Bernoulli's p cannot be negative.\n");
if (p > 1) throw runtime_error("Bernoulli's p cannot be above 1.\n");
return Random() < p;
}

Expand Down

0 comments on commit d5c8623

Please sign in to comment.