-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b4ae85
commit 2d52a8c
Showing
3 changed files
with
33 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
// moving fminsearch to ES6 - under development! | ||
console.log(`fminsearch.mjs loaded ${Date()}`) | ||
console.log(`fminsearch.mjs imported \n${Date()}`); | ||
|
||
const loaded = Date() | ||
// illustrative examples of fun | ||
|
||
export{ | ||
loaded | ||
function logistic(x,P){ | ||
return x.map( | ||
xi => 1 / (1 + Math.exp(-(P[0] + (P[1] * xi)))) | ||
) | ||
} | ||
|
||
|
||
export { | ||
logistic | ||
} |
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,6 @@ | ||
console.log(`index.js loaded \n${Date()}`); | ||
|
||
(async function(){ | ||
const fms = await import('./fminsearch.mjs') | ||
logistic = fms.logistic | ||
})() |