Permalink
Please sign in to comment.
Browse files
General code cleanup.
Removed dependency from boost libraries.
- Loading branch information...
Showing
with
206 additions
and 404 deletions.
- +0 −187 .cproject
- +0 −83 .project
- 0 saves.h → Data_Storage.h
- +20 −0 NM_Thalamus.pro
- +81 −0 Random_Stream.h
- +0 −17 T_model.pro
- +19 −18 Thalamic_Column.cpp
- +12 −21 Thalamic_Column.h
- +23 −53 Thalamus.cpp
- +51 −25 Main.cpp → Thalamus_mex.cpp
| @@ -1,83 +0,0 @@ | ||
| -<?xml version="1.0" encoding="UTF-8"?> | ||
| -<projectDescription> | ||
| - <name>Steyn-Ross</name> | ||
| - <comment></comment> | ||
| - <projects> | ||
| - </projects> | ||
| - <buildSpec> | ||
| - <buildCommand> | ||
| - <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> | ||
| - <triggers>clean,full,incremental,</triggers> | ||
| - <arguments> | ||
| - <dictionary> | ||
| - <key>?name?</key> | ||
| - <value></value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.append_environment</key> | ||
| - <value>true</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.autoBuildTarget</key> | ||
| - <value>all</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.buildArguments</key> | ||
| - <value></value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.buildCommand</key> | ||
| - <value>make</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.buildLocation</key> | ||
| - <value>${workspace_loc:/Steyn-Ross/Debug}</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.cleanBuildTarget</key> | ||
| - <value>clean</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.contents</key> | ||
| - <value>org.eclipse.cdt.make.core.activeConfigSettings</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.enableAutoBuild</key> | ||
| - <value>false</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.enableCleanBuild</key> | ||
| - <value>true</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.enableFullBuild</key> | ||
| - <value>true</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.fullBuildTarget</key> | ||
| - <value>all</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.stopOnError</key> | ||
| - <value>true</value> | ||
| - </dictionary> | ||
| - <dictionary> | ||
| - <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key> | ||
| - <value>true</value> | ||
| - </dictionary> | ||
| - </arguments> | ||
| - </buildCommand> | ||
| - <buildCommand> | ||
| - <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> | ||
| - <triggers>full,incremental,</triggers> | ||
| - <arguments> | ||
| - </arguments> | ||
| - </buildCommand> | ||
| - </buildSpec> | ||
| - <natures> | ||
| - <nature>org.eclipse.cdt.core.cnature</nature> | ||
| - <nature>org.eclipse.cdt.core.ccnature</nature> | ||
| - <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> | ||
| - <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> | ||
| - </natures> | ||
| -</projectDescription> |
File renamed without changes.
| @@ -0,0 +1,20 @@ | ||
| +TEMPLATE = app | ||
| +CONFIG += console | ||
| +CONFIG -= app_bundle | ||
| +CONFIG -= qt | ||
| + | ||
| +TARGET = Thalamus.cpp | ||
| + | ||
| +SOURCES += Thalamic_Column.cpp \ | ||
| + Thalamus_mex.cpp \ | ||
| + Thalamus.cpp | ||
| + | ||
| +HEADERS += Data_Storage.h \ | ||
| + ODE.h \ | ||
| + Random_Stream.h \ | ||
| + Stimulation.h \ | ||
| + Thalamic_Column.h | ||
| + | ||
| +QMAKE_CXXFLAGS += -std=c++11 -O3 | ||
| + | ||
| +SOURCES -= Thalamus_mex.cpp |
| @@ -0,0 +1,81 @@ | ||
| +/* | ||
| + * Copyright (c) 2015 University of Lübeck | ||
| + * | ||
| + * Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| + * of this software and associated documentation files (the "Software"), to deal | ||
| + * in the Software without restriction, including without limitation the rights | ||
| + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| + * copies of the Software, and to permit persons to whom the Software is | ||
| + * furnished to do so, subject to the following conditions: | ||
| + * | ||
| + * The above copyright notice and this permission notice shall be included in | ||
| + * all copies or substantial portions of the Software. | ||
| + * | ||
| + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
| + * THE SOFTWARE. | ||
| + * | ||
| + * AUTHORS: Michael Schellenberger Costa: mschellenbergercosta@gmail.com | ||
| + * Stefanie Gareis: gareis@inb.uni-luebeck.de | ||
| + * | ||
| + */ | ||
| + | ||
| +/****************************************************************************************************/ | ||
| +/* Random number streams */ | ||
| +/****************************************************************************************************/ | ||
| +#pragma once | ||
| +#include <random> | ||
| + | ||
| +/****************************************************************************************************/ | ||
| +/* Struct for normal distribution */ | ||
| +/****************************************************************************************************/ | ||
| +struct random_stream_normal | ||
| +{ | ||
| + /* Random number engine: Mersenne-Twister */ | ||
| + std::mt19937_64 mt; | ||
| + /* Random number generator: Normal-distribution */ | ||
| + std::normal_distribution<double> norm_dist; | ||
| + | ||
| + /* Constructors */ | ||
| + random_stream_normal(){} | ||
| + random_stream_normal(double mean, double stddev) | ||
| + : mt(rand()) , norm_dist(mean, stddev) | ||
| + {} | ||
| + | ||
| + /* Overwrites the function-call operator "( )" */ | ||
| + double operator( )(void) { | ||
| + return norm_dist(mt); | ||
| + } | ||
| +}; | ||
| +/****************************************************************************************************/ | ||
| +/* end */ | ||
| +/****************************************************************************************************/ | ||
| + | ||
| +/****************************************************************************************************/ | ||
| +/* Struct for uniform int distribution */ | ||
| +/****************************************************************************************************/ | ||
| +struct random_stream_uniform_int | ||
| +{ | ||
| + /* Random number engine: Mersenne-Twister */ | ||
| + std::mt19937_64 mt; | ||
| + /* Random number generator: Uniform integer-distribution */ | ||
| + std::uniform_int_distribution<> uniform_dist; | ||
| + | ||
| + /* Constructors */ | ||
| + random_stream_uniform_int(){} | ||
| + random_stream_uniform_int(double lower_bound, double upper_bound) | ||
| + : mt(rand()) , uniform_dist(lower_bound, upper_bound) | ||
| + {} | ||
| + | ||
| + /* Overwrites the function-call operator "( )" */ | ||
| + double operator( )(void) { | ||
| + return uniform_dist(mt); | ||
| + } | ||
| +}; | ||
| +/****************************************************************************************************/ | ||
| +/* end */ | ||
| +/****************************************************************************************************/ |
17
T_model.pro
| @@ -1,17 +0,0 @@ | ||
| -TEMPLATE = app | ||
| -CONFIG += console | ||
| -CONFIG -= app_bundle | ||
| -CONFIG -= qt | ||
| - | ||
| -SOURCES += Main.cpp \ | ||
| - Thalamic_Column.cpp \ | ||
| - Thalamus.cpp | ||
| - | ||
| -HEADERS += ODE.h \ | ||
| - saves.h \ | ||
| - Thalamic_Column.h \ | ||
| - Stimulation.h | ||
| - | ||
| -QMAKE_CXXFLAGS += -std=c++11 -O3 | ||
| - | ||
| -SOURCES -= Thalamus.cpp |
Oops, something went wrong.
0 comments on commit
f3c245c