-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ELIFE-ASU/dev
Update to version 0.0.3
- Loading branch information
Showing
40 changed files
with
1,894 additions
and
1,378 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
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,15 @@ | ||
version: 0.0.3.{build} | ||
configuration: | ||
- Debug | ||
- Release | ||
platform: | ||
- x64 | ||
- x86 | ||
- Any CPU | ||
before_build: | ||
- ps: cmake . | ||
build: | ||
project: ALL_BUILD.vcxproj | ||
verbosity: normal | ||
test_script: | ||
- cmd: test\%CONFIGURATION%\inform_unittest.exe |
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,24 @@ | ||
#!/usr/bin/env bash | ||
|
||
function usage { | ||
echo "Usage: ${0##*/} [--prefix=<prefix>]" | ||
exit 1 | ||
} | ||
|
||
if [[ $# -eq 0 ]]; then | ||
prefix=/usr/local | ||
elif [[ $# -eq 1 ]]; then | ||
prefix=${1#"--prefix="} | ||
if [[ $prefix == $1 ]]; then | ||
prefix=${1#"--PREFIX="} | ||
if [[ $prefix == $1 ]]; then | ||
usage | ||
fi | ||
fi | ||
else | ||
usage | ||
fi | ||
|
||
mkdir -p $prefix | ||
cp -R include $prefix | ||
cp -R lib $prefix |
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,20 @@ | ||
$version = (cmake . -Bbuild/production -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" | Select-String '-- inform version: ') | ||
$version = $version.ToString().Split(' ')[3] | ||
|
||
$prefix = "inform-$version" | ||
$target = "dist/$prefix" | ||
$archive = "$($target)_win-amd64.zip" | ||
|
||
cmake . -Bbuild/production -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$target" | Out-Null | ||
cd build/production | ||
nmake | ||
test/inform_unittest.exe | ||
nmake install | ||
cd ../.. | ||
Copy-Item LICENSE $target | ||
Copy-Item README.md $target | ||
|
||
Remove-Item -force $archive | ||
Add-Type -Assembly System.IO.Compression.FileSystem | ||
$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal | ||
[System.IO.Compression.ZipFile]::CreateFromDirectory($target, $archive, $compressionLevel, $true) |
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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
version=$(cmake -H. -Bbuild/production -DCMAKE_BUILD_TYPE=Release | grep "\-\- inform version:") | ||
version=${version#"-- inform version: "} | ||
|
||
target=inform-$version | ||
prefix=dist/$target | ||
tarball=$target"_linux-x86_64.tar.gz" | ||
|
||
cmake -H. -Bbuild/production -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$prefix > /dev/null | ||
make -C build/production all test | ||
make -C build/production install > /dev/null | ||
cp dist/install.sh $prefix > /dev/null | ||
cp LICENSE $prefix > /dev/null | ||
cp README.md $prefix > /dev/null | ||
|
||
cd dist | ||
echo "Creating tarball: dist/$tarball" | ||
tar czf $tarball $target |
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,44 @@ | ||
// Copyright 2016 ELIFE. All rights reserved. | ||
// Use of this source code is governed by a MIT | ||
// license that can be found in the LICENSE file. | ||
#pragma once | ||
|
||
#include <inform/error.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
/** | ||
* Compute the block entropy of an ensemble of time series | ||
* | ||
* @param[in] series the ensemble of time series | ||
* @param[in] n the number of initial conditions | ||
* @param[in] m the number of time steps in each time series | ||
* @param[in] b the base or number of distinct states at each time step | ||
* @param[in] k the history length used to calculate the active information | ||
* @param[out] err an error structure | ||
* @return the block entropy for the ensemble | ||
*/ | ||
EXPORT double inform_block_entropy(int const *series, size_t n, size_t m, int b, | ||
size_t k, inform_error *err); | ||
|
||
/** | ||
* Compute the local block entropy of a ensemble of time series | ||
* | ||
* @param[in] series the ensemble of time series | ||
* @param[in] n the number of initial conditions | ||
* @param[in] m the number of time steps in each time series | ||
* @param[in] b the base or number of distinct states at each time step | ||
* @param[in] k the history length used to calculate the active information | ||
* @param[out] ent the local entropy | ||
* @param[out] err an error structure | ||
* @return a pointer to the local block entropy array | ||
*/ | ||
EXPORT double *inform_local_block_entropy(int const *series, size_t n, size_t m, | ||
int b, size_t k, double *ent, inform_error *err); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
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
Oops, something went wrong.