Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved all external "C" functions to Utilities.Auxiliary
Replaceable Seeds should now be standard conform for extending
- Loading branch information
1 parent
db11763
commit cd0e498
Showing
8 changed files
with
26 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
within Noise.Utilities.Auxiliary; | ||
function SeedReal "Uses a real value for initializing an RNG's state vector" | ||
|
||
input Integer local_seed "The local seed"; | ||
input Integer global_seed "The global seed"; | ||
input Real real_seed "The real seed"; | ||
input Integer n "The number of initial state values to be generated"; | ||
output Integer states[n] "The generated initial states"; | ||
|
||
external "C" NOISE_SeedReal(local_seed, global_seed, real_seed, n, states); | ||
|
||
annotation (Include = "#include \"ModelicaNoise.c\"", Documentation(revisions="<html> | ||
<p><img src=\"modelica://Noise/Resources/Images/dlr_logo.png\"/> <b>Developed 2014 at the DLR Institute of System Dynamics and Control</b> </p> | ||
</html>", info="<html> | ||
<p>This function converts the Real value to Integer values and fills the state vector with them.</p> | ||
</html>")); | ||
end SeedReal; |
2 changes: 1 addition & 1 deletion
2
Noise/Utilities/Seedings/combineSeedLCG.mo → Noise/Utilities/Auxiliary/combineSeedLCG.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
shuffleDouble | ||
SeedReal | ||
combineSeedLCG |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ Analysis | |
Auxiliary | ||
Math | ||
Interaction | ||
Seedings |