summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-04-26 18:07:09 -0700
committerBryan Bishop <kanzure@gmail.com>2012-04-26 18:07:09 -0700
commita6d05bc43d2d5e7db7be5c761b5f3da94c0e963a (patch)
tree60d63795d45519786c8e28be46ac2d4801de1042
parent103cdaeaa237d89bff79aaecb704d288df873cc5 (diff)
downloadnetmorph-a6d05bc43d2d5e7db7be5c761b5f3da94c0e963a.tar.gz
netmorph-a6d05bc43d2d5e7db7be5c761b5f3da94c0e963a.zip
updates from 2011-05-10 version
-rwxr-xr-x[-rw-r--r--]Command_Line_Parameters.hh2
-rw-r--r--Makefile32
-rwxr-xr-x[-rw-r--r--]Makefile.linux16
-rw-r--r--Makefile.mac352
-rw-r--r--dil2al/Makefile10
-rw-r--r--dil2al/Makefile.mac193
-rw-r--r--fibre_structure.hh29
-rw-r--r--geometry/Makefile6
-rw-r--r--geometry/Makefile.mac60
-rwxr-xr-xinstall.sh19
-rw-r--r--nibr.cc86
-rw-r--r--prepost_structure.cc5
-rw-r--r--synapse.cc13
-rwxr-xr-x[-rw-r--r--]synapse_formation_model.cc291
14 files changed, 1037 insertions, 77 deletions
diff --git a/Command_Line_Parameters.hh b/Command_Line_Parameters.hh
index 1d11293..24132bd 100644..100755
--- a/Command_Line_Parameters.hh
+++ b/Command_Line_Parameters.hh
@@ -31,7 +31,7 @@
#ifndef __COMMAND_LINE_PARAMETERS_HH
#define __COMMAND_LINE_PARAMETERS_HH
-#include <limits>
+#include <limits.h>
#include <cfloat>
//STL#include <vector>
#include "StringList.hh"
diff --git a/Makefile b/Makefile
index 54fe25b..bf558ed 100644
--- a/Makefile
+++ b/Makefile
@@ -39,8 +39,8 @@ LIB_PATH= -L$(HOME)/src/lib
## Machine selection
## -----------------
## aurora (x86):
-MACHSPEC=
-MACHSTR=x86
+MACHSPEC=-march=native
+MACHSTR=
MACHOPT=
#MACHOPT=-march=pentium4 -mtune=pentium4 -mfpmath=sse
##
@@ -93,8 +93,8 @@ DEBUGGING=
#-DDEBUGGING_ELONGATION -DDEBUGGING_DIRECTION -DINCLUDE_PDF_SAMPLING
## Put conditional defines, such as -D__SPATIAL_SEGMENT_SUBSET_TEST into
## the variable NIBRCONDITIONAL and export before running make.
-CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Werror -Wno-char-subscripts $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(OUTPUTCHOICES)
-CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(NIBRCONDITIONAL) $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall -Wmissing-field-initializers -Werror $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(CPPTEMPWORKAROUND) $(OUTPUTCHOICES)
+CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(OUTPUTCHOICES)
+CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(NIBRCONDITIONAL) $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(CPPTEMPWORKAROUND) $(OUTPUTCHOICES)
REGEXSTR=regex-gnu_for_C++
FIG2DEV=$(shell which fig2dev)
##
@@ -134,13 +134,13 @@ SAFEREGEX= -D_BIGREGEX_SAFE_MATCHES
## Compiler Options
## ----------------
# Normal:
-COMPOPT=-O3
+COMPOPT=-O3 -p
OPTSTR=optimized
## debugging information:
# For gprof:
#GPROF=-pg
# For Valgrind:
-#COMPOPT=-g -O0
+#COMPOPT=-g -O0 -Wall
#OPTSTR=Valgrind
# For gprof:
#COMPOPT=-pg -O3
@@ -196,11 +196,11 @@ spatial.o spatial2D.o: spatial.cc spatial.hh Spatial_Presentation.hh global.hh
$(CCPP) $(CPPFLAGS) -DVECTOR3D -c spatial.cc -o spatial.o
$(CCPP) $(CPPFLAGS) -DVECTOR2D -c spatial.cc -o spatial2D.o
-network.o network2D.o: network.cc network.hh neuron.hh Network_Statistics.hh synapse.hh synapse_formation_model.hh global.hh file.hh Command_Line_Parameters.hh Network_Generated_Statistics.hh Sampled_Output.hh Network_Statistics.hh Spatial_Segment_Subset.hh Results.hh Connection_Statistics.hh dendritic_growth_model.hh neurite_diameter_model.hh spatial.hh event.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh slice.hh
+network.o network2D.o: network.cc network.hh Network_Statistics.hh synapse.hh synapse_formation_model.hh global.hh file.hh Command_Line_Parameters.hh Network_Generated_Statistics.hh Sampled_Output.hh Network_Statistics.hh Spatial_Segment_Subset.hh Results.hh Connection_Statistics.hh dendritic_growth_model.hh neurite_diameter_model.hh spatial.hh event.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh slice.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c network.cc -o network.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c network.cc -o network2D.o
-neuron.o neuron2D.o: neuron.cc neuron.hh network.hh prepost_structure.hh connection.hh fibre_elongation_model.hh axon_direction_model.hh branching_models.hh turning_models.hh Color_Table.hh spatial.hh event.hh global.hh Network_Generated_Statistics.hh Sampled_Output.hh Command_Line_Parameters.hh BigString.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh
+neuron.o neuron2D.o: neuron.cc neuron.hh network.hh prepost_structure.hh connection.hh fibre_elongation_model.hh axon_direction_model.hh Color_Table.hh spatial.hh event.hh global.hh Network_Generated_Statistics.hh Sampled_Output.hh Command_Line_Parameters.hh BigString.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c neuron.cc -o neuron.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c neuron.cc -o neuron2D.o
@@ -231,11 +231,11 @@ turning_models.o turning_models2D.o: turning_models.cc turning_models.hh dendrit
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c turning_models.cc -o turning_models.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c turning_models.cc -o turning_models2D.o
-axon_direction_model.o axon_direction_model2D.o: axon_direction_model.cc axon_direction_model.hh dendritic_growth_model.hh fibre_structure.hh neuron.hh spatial.hh Spatial_Presentation.hh Command_Line_Parameters.hh global.hh
+axon_direction_model.o axon_direction_model2D.o: axon_direction_model.cc axon_direction_model.hh dendritic_growth_model.hh fibre_structure.hh neuron.hh spatial.hh Command_Line_Parameters.hh global.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c axon_direction_model.cc -o axon_direction_model.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c axon_direction_model.cc -o axon_direction_model2D.o
-fibre_elongation_model.o fibre_elongation_model2D.o: fibre_elongation_model.cc fibre_elongation_model.hh dendritic_growth_model.hh axon_direction_model.hh fibre_structure.hh neuron.hh event.hh Command_Line_Parameters.hh global.hh Txt_Object.hh diagnostic.hh
+fibre_elongation_model.o fibre_elongation_model2D.o: fibre_elongation_model.cc fibre_elongation_model.hh dendritic_growth_model.hh axon_direction_model.hh fibre_structure.hh neuron.hh event.hh Command_Line_Parameters.hh global.hh diagnostic.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c fibre_elongation_model.cc -o fibre_elongation_model.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c fibre_elongation_model.cc -o fibre_elongation_model2D.o
@@ -255,11 +255,11 @@ synapse_structure.o synapse_structure2D.o: synapse_structure.cc synapse_structur
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c synapse_structure.cc -o synapse_structure.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c synapse_structure.cc -o synapse_structure2D.o
-fibre_structure.o fibre_structure2D.o: fibre_structure.cc fibre_structure.hh dendritic_growth_model.hh axon_direction_model.hh branching_models.hh turning_models.hh fibre_elongation_model.hh environment_physics.hh neuron.hh event.hh Network_Generated_Statistics.hh Sampled_Output.hh Fig_Object.hh spatial.hh global.hh Color_Table.hh diagnostic.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh Command_Line_Parameters.hh
+fibre_structure.o fibre_structure2D.o: fibre_structure.cc fibre_structure.hh dendritic_growth_model.hh axon_direction_model.hh branching_models.hh fibre_elongation_model.hh environment_physics.hh neuron.hh event.hh Network_Generated_Statistics.hh Sampled_Output.hh Fig_Object.hh spatial.hh global.hh diagnostic.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh Command_Line_Parameters.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c fibre_structure.cc -o fibre_structure.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c fibre_structure.cc -o fibre_structure2D.o
-prepost_structure.o prepost_structure2D.o: prepost_structure.cc prepost_structure.hh neuron.hh network.hh axon_direction_model.hh branching_models.hh turning_models.hh spatial.hh fibre_structure.hh Network_Generated_Statistics.hh global.hh state_storable.hh
+prepost_structure.o prepost_structure2D.o: prepost_structure.cc prepost_structure.hh neuron.hh network.hh axon_direction_model.hh spatial.hh fibre_structure.hh Network_Generated_Statistics.hh global.hh state_storable.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c prepost_structure.cc -o prepost_structure.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c prepost_structure.cc -o prepost_structure2D.o
@@ -316,7 +316,7 @@ slice.o: slice.cc slice.hh spatial.hh Command_Line_Parameters.hh global.hh
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c slice.cc -o slice.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c slice.cc -o slice2D.o
-nibr.o nibr2D.o: nibr.cc nibr.hh neuron.hh network.hh prepost_structure.hh synapse.hh synapse_formation_model.hh axon_direction_model.hh environment_physics.hh Command_Line_Parameters.hh Sampled_Output.hh Txt_Object.hh Spatial_Presentation.hh file.hh spatial.hh event.hh slice.hh diagnostic.hh BigString.hh BigRegex.hh mtprng.hh regex-gnu.h
+nibr.o nibr2D.o: nibr.cc nibr.hh network.hh synapse.hh synapse_formation_model.hh axon_direction_model.hh environment_physics.hh Command_Line_Parameters.hh Sampled_Output.hh Spatial_Presentation.hh file.hh spatial.hh event.hh slice.hh diagnostic.hh BigString.hh BigRegex.hh mtprng.hh regex-gnu.h
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -DFIG2DEV=\"$(FIG2DEV)\" -c nibr.cc -o nibr.o
$(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -DFIG2DEV=\"$(FIG2DEV)\" -c nibr.cc -o nibr2D.o
@@ -346,7 +346,7 @@ wizard: wizard.o StringList.o BigString.o BigRegex.o regex-gnu.o
clean:
rm -r -f *.o $(NAME)
- ln -s ../../dil2al/BigString.o
- ln -s ../../dil2al/BigRegex.o
- ln -s ../../dil2al/regex-gnu.o
+ ln -s $(HOME)/src/dil2al/BigString.o
+ ln -s $(HOME)/src/dil2al/BigRegex.o
+ ln -s $(HOME)/src/dil2al/regex-gnu.o
diff --git a/Makefile.linux b/Makefile.linux
index ba984cc..e19cf0b 100644..100755
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -39,8 +39,8 @@ LIB_PATH= -L$(HOME)/src/lib
## Machine selection
## -----------------
## aurora (x86):
-MACHSPEC=
-MACHSTR=x86
+MACHSPEC=-march=native
+MACHSTR=
MACHOPT=
#MACHOPT=-march=pentium4 -mtune=pentium4 -mfpmath=sse
##
@@ -93,8 +93,8 @@ DEBUGGING=
#-DDEBUGGING_ELONGATION -DDEBUGGING_DIRECTION -DINCLUDE_PDF_SAMPLING
## Put conditional defines, such as -D__SPATIAL_SEGMENT_SUBSET_TEST into
## the variable NIBRCONDITIONAL and export before running make.
-CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Werror -Wno-char-subscripts $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(OUTPUTCHOICES)
-CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(NIBRCONDITIONAL) $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall -Werror $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(CPPTEMPWORKAROUND) $(OUTPUTCHOICES)
+CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(OUTPUTCHOICES)
+CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(NIBRCONDITIONAL) $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(CPPTEMPWORKAROUND) $(OUTPUTCHOICES)
REGEXSTR=regex-gnu_for_C++
FIG2DEV=$(shell which fig2dev)
##
@@ -140,7 +140,7 @@ OPTSTR=optimized
# For gprof:
#GPROF=-pg
# For Valgrind:
-#COMPOPT=-g -O0
+#COMPOPT=-g -O0 -Wall
#OPTSTR=Valgrind
# For gprof:
#COMPOPT=-pg -O3
@@ -346,7 +346,7 @@ wizard: wizard.o StringList.o BigString.o BigRegex.o regex-gnu.o
clean:
rm -r -f *.o $(NAME)
- ln -s ../../dil2al/BigString.o
- ln -s ../../dil2al/BigRegex.o
- ln -s ../../dil2al/regex-gnu.o
+ ln -s $(HOME)/src/dil2al/BigString.o
+ ln -s $(HOME)/src/dil2al/BigRegex.o
+ ln -s $(HOME)/src/dil2al/regex-gnu.o
diff --git a/Makefile.mac b/Makefile.mac
new file mode 100644
index 0000000..0246483
--- /dev/null
+++ b/Makefile.mac
@@ -0,0 +1,352 @@
+# © Copyright 2008 Randal A. Koene <randalk@netmorph.org>
+#
+# With design assistance from J. van Pelt & A. van Ooyen, and support
+# from the Netherlands Organization for Scientific Research (NWO)
+# Program Computational Life Sciences grant CLS2003 (635.100.005) and
+# from the EC Marie Curie Research and Training Network (RTN)
+# NEURoVERS-it 019247.
+
+# This file is part of NETMORPH.
+
+# NETMORPH is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# NETMORPH is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with NETMORPH. If not, see <http://www.gnu.org/licenses/>.
+
+#
+# Makefile for NETMORPH
+# (by Randal A. Koene, randalk@minduploading.org)
+
+##########################################################
+## Compiler
+## --------
+CC=gcc
+CCPP=g++
+##########################################################
+
+INCLUDES= -I$(HOME)/src/include
+LIB_PATH= -L$(HOME)/src/lib
+
+##########################################################
+## Machine selection
+## -----------------
+## aurora (x86):
+MACHSPEC=
+MACHSTR=
+MACHOPT=
+#MACHOPT=-march=pentium4 -mtune=pentium4 -mfpmath=sse
+##
+## kenji (SUN Ultra):
+#MACHSPEC= -DSUN_RX
+#MACHSTR=SUN
+##
+##########################################################
+### Attempting a temporary fix for gcc 4.x compilation of dil2al
+### (This should be replaced by actual source code modification.)
+CPPTEMPWORKAROUND=-fno-access-control
+
+##########################################################
+## Regular Expression Library
+## --------------------------
+## (Suggestion: Using regex-gnu.h guarantees the greatest
+## amount of compatibility and identical behaviour on all
+## platforms, since it is included with the dil2al source
+## code and has been adapted for reliable use with C++.)
+##
+## regex-gnu.h adapted for integration with C++:
+GCC3FXTRA=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[3-9][.]"),-Wno-unused-function)
+ALT_REGEX=regex-gnu.o
+ALT_REGEX_H=\"regex-gnu.h\"
+MEMTESTS=
+#MEMTESTS=-DMEMTESTS
+#PROFILING=
+PROFILING=-DEVALUATE_POSSIBLE_CONNECTION_PROFILING
+#SYNAPSEINVENTORY=
+SYNAPSEINVENTORY=-DSYNAPTOGENESIS_AND_LOSS_INVENTORY
+#STATISTICSVERBOSITY=-DVERBOSE_EMPTY_DATA_SAMPLE_WARNINGS
+#STATISTICS=-DSAMPLES_INCLUDE_NETWORK_GENERATED_STATISTICS $(STATISTICSVERBOSITY)
+STATISTICS=-DSAMPLES_INCLUDE_NETWORK_STATISTICS_BASE $(STATISTICSVERBOSITY)
+#STATISTICS=-DSAMPLES_INCLUDE_NETWORK_STATISTICS_BASE
+MEMORYSAVING=
+#MEMORYSAVING=-DREDUCED_MEMORY_PTSEM
+#RNGCHOICE=-DFAST_RNG
+RNGCHOICE=-DPRECISE_RNG
+#MODELCHOICES=-DADM_PRIORITIZE_SPEED_OVER_SPACE -DTESTING_SIMPLE_ATTRACTION -DENABLE_APICAL_TUFTING_TRIGGER_DISTANCE $(RNGCHOICE) $(MEMORYSAVING) -DINCLUDE_SIMPLE_FIBER_DIAMETER
+MODELCHOICES=-DADM_PRIORITIZE_SPEED_OVER_SPACE -DTESTING_SIMPLE_ATTRACTION $(RNGCHOICE) $(MEMORYSAVING) -DINCLUDE_SIMPLE_FIBER_DIAMETER
+OUTPUTCHOICES=-DCHECK_XFIG_RANGES
+#-DTESTING_SPIKING
+#-DLEGACY_ELONGATION
+SIMULATIONMETHODS=-DENABLE_FIXED_STEP_SIMULATION -DFIXED_STEP_SIMULATION_START_AT_DT -DTESTING_SPIKING
+DEBUGGING=
+#DEBUGGING=-DDEBUG_SPHERICAL_BOUNDARY
+#DEBUGGING=-DTESTING_ELONGATION_TOTAL
+#DEBUGGING=-DTEST_FOR_NAN
+#DEBUGGING=-DINCLUDE_PDF_SAMPLING
+#-DDEBUGGING_ELONGATION -DDEBUGGING_DIRECTION -DINCLUDE_PDF_SAMPLING
+## Put conditional defines, such as -D__SPATIAL_SEGMENT_SUBSET_TEST into
+## the variable NIBRCONDITIONAL and export before running make.
+CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(OUTPUTCHOICES)
+CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(NIBRCONDITIONAL) $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall $(GCC3FXTRA) $(MEMTESTS) $(PROFILING) $(SYNAPSEINVENTORY) $(STATISTICS) $(MODELCHOICES) $(SIMULATIONMETHODS) $(DEBUGGING) $(CPPTEMPWORKAROUND) $(OUTPUTCHOICES)
+REGEXSTR=regex-gnu_for_C++
+FIG2DEV=$(shell which fig2dev)
+##
+## rx.h:
+#ALT_REGEX=rx.o
+#ALT_REGEX_H=
+#CFXTRA= -D__DIL2AL__
+#CPPXTRA= -D__DIL2AL__ -D_BIGREGEX_HAS_RM_SPEP
+#REGEXSTR=rx
+##
+## generic GNU regex (Linux/GNU specific):
+#ALT_REGEX=regex.o
+#ALT_REGEX_H=regex.h
+#CFXTRA=
+#CPPXTRA= -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D__DIL2AL__ -D_BIGREGEX_HAS_RM_SPEP
+#REGEXSTR=regex
+##
+## system <regex.h> (SUN specific):
+#ALT_REGEX=
+#ALT_REGEX_H=
+#CFXTRA= -DSYSTEM_RX
+#CPPXTRA= -D__DIL2AL__ -DSYSTEM_RX
+#REGEXSTR=system
+##########################################################
+
+##########################################################
+## Safe Regular Expressions
+## ------------------------
+## assume '\0' within String length and rm structure has
+## no sp/ep pointers:
+#SAFEREGEX=
+## make no assumptions:
+SAFEREGEX= -D_BIGREGEX_SAFE_MATCHES
+##########################################################
+
+##########################################################
+## Compiler Options
+## ----------------
+# Normal:
+COMPOPT=-O3
+OPTSTR=optimized
+## debugging information:
+# For gprof:
+#GPROF=-pg
+# For Valgrind:
+#COMPOPT=-g -O0 -Wall
+#OPTSTR=Valgrind
+# For gprof:
+#COMPOPT=-pg -O3
+#OPTSTR=Gprof
+#COMPOPT= -g
+#OPTSTR=debugging_info
+##########################################################
+
+##########################################################
+## C++ Specific Compiler Options
+## -----------------------------
+## debugging information:
+#CPPOPT=
+## generate profile information for use with gprof:
+#CPPOPT=
+## optimized:
+CPPOPT= -felide-constructors
+##########################################################
+
+CFLAGS= $(COMPOPT) $(MACHSPEC) $(CFXTRA)
+CPPFLAGS= $(COMPOPT) $(CPPOPT) $(MACHSPEC) $(CPPXTRA) $(SAFEREGEX) $(INCLUDES)
+
+.INIT:
+ @echo '-------------------------------------------------------------------'
+ @echo 'Compilation options: $(MACHSTR), $(OPTSTR), $(REGEXSTR)'
+ @echo '-------------------------------------------------------------------'
+
+all: nibr nibr2D wizard
+
+diagnostic.o: diagnostic.cc diagnostic.hh file.hh BigString.hh BigRegex.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c diagnostic.cc -o diagnostic.o
+
+state_storable.o: state_storable.cc state_storable.hh global.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c state_storable.cc -o state_storable.o
+
+mtprng.o: mtprng.cc mtprng.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c mtprng.cc -o mtprng.o
+
+global.o: global.cc global.hh file.hh Fig_Object.hh Command_Line_Parameters.hh mtprng.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c global.cc -o global.o
+
+file.o: file.cc file.hh BigString.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c file.cc -o file.o
+
+StringList.o: StringList.cc StringList.hh BigString.hh BigRegex.hh regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c StringList.cc -o StringList.o
+
+event.o event2D.o: event.cc event.hh network.hh global.hh Command_Line_Parameters.hh state_storable.hh
+ $(CCPP) $(CPPFLAGS) -DVECTOR3D -c event.cc -o event.o
+ $(CCPP) $(CPPFLAGS) -DVECTOR2D -c event.cc -o event2D.o
+
+spatial.o spatial2D.o: spatial.cc spatial.hh Spatial_Presentation.hh global.hh
+ $(CCPP) $(CPPFLAGS) -DVECTOR3D -c spatial.cc -o spatial.o
+ $(CCPP) $(CPPFLAGS) -DVECTOR2D -c spatial.cc -o spatial2D.o
+
+network.o network2D.o: network.cc network.hh Network_Statistics.hh synapse.hh synapse_formation_model.hh global.hh file.hh Command_Line_Parameters.hh Network_Generated_Statistics.hh Sampled_Output.hh Network_Statistics.hh Spatial_Segment_Subset.hh Results.hh Connection_Statistics.hh dendritic_growth_model.hh neurite_diameter_model.hh spatial.hh event.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh slice.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c network.cc -o network.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c network.cc -o network2D.o
+
+neuron.o neuron2D.o: neuron.cc neuron.hh network.hh prepost_structure.hh connection.hh fibre_elongation_model.hh axon_direction_model.hh Color_Table.hh spatial.hh event.hh global.hh Network_Generated_Statistics.hh Sampled_Output.hh Command_Line_Parameters.hh BigString.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c neuron.cc -o neuron.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c neuron.cc -o neuron2D.o
+
+IFactivity.o IFactivity2D.o: IFactivity.cc IFactivity.hh neuron.hh connection.hh Sampled_Output.hh event.hh
+ $(CCPP) $(CPPFLAGS) -DVECTOR3D -c IFactivity.cc -o IFactivity.o
+ $(CCPP) $(CPPFLAGS) -DVECTOR2D -c IFactivity.cc -o IFactivity2D.o
+
+synapse.o synapse2D.o: synapse.cc synapse.hh connection.hh synapse_structure.hh Fig_Object.hh Color_Table.hh global.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c synapse.cc -o synapse.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c synapse.cc -o synapse2D.o
+
+connection.o connection2D.o: connection.cc connection.hh neuron.hh Fig_Object.hh Sampled_Output.hh state_storable.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c connection.cc -o connection.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c connection.cc -o connection2D.o
+
+generic_synapse.o: generic_synapse.cc generic_synapse.hh nibr.hh BigString.hh BigRegex.hh regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c generic_synapse.cc -o generic_synapse.o
+
+synapse_formation_model.o synapse_formation_model2D.o: synapse_formation_model.cc synapse_formation_model.hh fibre_structure.hh synapse_structure.hh synapse.hh Connection_Statistics.hh neuron.hh spatial.hh Command_Line_Parameters.hh diagnostic.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c synapse_formation_model.cc -o synapse_formation_model.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c synapse_formation_model.cc -o synapse_formation_model2D.o
+
+branching_models.o branching_models2D.o: branching_models.cc branching_models.hh dendritic_growth_model.hh fibre_structure.hh neuron.hh spatial.hh Command_Line_Parameters.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c branching_models.cc -o branching_models.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c branching_models.cc -o branching_models2D.o
+
+turning_models.o turning_models2D.o: turning_models.cc turning_models.hh dendritic_growth_model.hh fibre_structure.hh neuron.hh spatial.hh Command_Line_Parameters.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c turning_models.cc -o turning_models.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c turning_models.cc -o turning_models2D.o
+
+axon_direction_model.o axon_direction_model2D.o: axon_direction_model.cc axon_direction_model.hh dendritic_growth_model.hh fibre_structure.hh neuron.hh spatial.hh Command_Line_Parameters.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c axon_direction_model.cc -o axon_direction_model.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c axon_direction_model.cc -o axon_direction_model2D.o
+
+fibre_elongation_model.o fibre_elongation_model2D.o: fibre_elongation_model.cc fibre_elongation_model.hh dendritic_growth_model.hh axon_direction_model.hh fibre_structure.hh neuron.hh event.hh Command_Line_Parameters.hh global.hh diagnostic.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c fibre_elongation_model.cc -o fibre_elongation_model.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c fibre_elongation_model.cc -o fibre_elongation_model2D.o
+
+dendritic_growth_model.o dendritic_growth_model2D.o: dendritic_growth_model.cc dendritic_growth_model.hh axon_direction_model.hh fibre_structure.hh network.hh neuron.hh Connection_Statistics.hh Sampled_Output.hh Command_Line_Parameters.hh global.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c dendritic_growth_model.cc -o dendritic_growth_model.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c dendritic_growth_model.cc -o dendritic_growth_model2D.o
+
+neurite_diameter_model.o: neurite_diameter_model.cc neurite_diameter_model.hh fibre_structure.hh network.hh Command_Line_Parameters.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c neurite_diameter_model.cc -o neurite_diameter_model.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c neurite_diameter_model.cc -o neurite_diameter_model2D.o
+
+environment_physics.o: environment_physics.cc environment_physics.hh neuron.hh network.hh event.hh Command_Line_Parameters.hh spatial.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c environment_physics.cc -o environment_physics.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c environment_physics.cc -o environment_physics2D.o
+
+synapse_structure.o synapse_structure2D.o: synapse_structure.cc synapse_structure.hh fibre_structure.hh Fig_Object.hh Sampled_Output.hh spatial.hh global.hh state_storable.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c synapse_structure.cc -o synapse_structure.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c synapse_structure.cc -o synapse_structure2D.o
+
+fibre_structure.o fibre_structure2D.o: fibre_structure.cc fibre_structure.hh dendritic_growth_model.hh axon_direction_model.hh branching_models.hh fibre_elongation_model.hh environment_physics.hh neuron.hh event.hh Network_Generated_Statistics.hh Sampled_Output.hh Fig_Object.hh spatial.hh global.hh diagnostic.hh state_storable.hh Txt_Object.hh VRML_Object.hh Catacomb_Object.hh Command_Line_Parameters.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c fibre_structure.cc -o fibre_structure.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c fibre_structure.cc -o fibre_structure2D.o
+
+prepost_structure.o prepost_structure2D.o: prepost_structure.cc prepost_structure.hh neuron.hh network.hh axon_direction_model.hh spatial.hh fibre_structure.hh Network_Generated_Statistics.hh global.hh state_storable.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c prepost_structure.cc -o prepost_structure.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c prepost_structure.cc -o prepost_structure2D.o
+
+Connection_Statistics.o Connection_Statistics2D.o: Connection_Statistics.cc Connection_Statistics.hh neuron.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c Connection_Statistics.cc -o Connection_Statistics.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c Connection_Statistics.cc -o Connection_Statistics2D.o
+
+Network_Statistics.o Network_Statistics2D.o: Network_Statistics.cc Network_Statistics.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c Network_Statistics.cc -o Network_Statistics.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c Network_Statistics.cc -o Network_Statistics2D.o
+
+Spatial_Segment_Subset.o Spatial_Segment_Subset2D.o: Spatial_Segment_Subset.cc Spatial_Segment_Subset.hh fibre_structure.hh synapse_formation_model.hh Fig_Object.hh Color_Table.hh spatial.hh global.hh diagnostic.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c Spatial_Segment_Subset.cc -o Spatial_Segment_Subset.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c Spatial_Segment_Subset.cc -o Spatial_Segment_Subset2D.o
+
+Command.o: Command.cc BigString.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Command.cc -o Command.o
+
+Command_Line_Parameters.o: Command_Line_Parameters.cc Command_Line_Parameters.hh file.hh global.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Command_Line_Parameters.cc -o Command_Line_Parameters.o
+
+Results.o: Results.cc Results.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Results.cc -o Results.o
+
+Network_Generated_Statistics.o: Network_Generated_Statistics.cc Network_Generated_Statistics.hh Command_Line_Parameters.hh global.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Network_Generated_Statistics.cc -o Network_Generated_Statistics.o
+
+Spatial_Presentation.o Spatial_Presentation2D.o: Spatial_Presentation.cc Spatial_Presentation.hh global.hh Command_Line_Parameters.hh spatial.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -DFIG2DEV=\"$(FIG2DEV)\" -c Spatial_Presentation.cc -o Spatial_Presentation.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -DFIG2DEV=\"$(FIG2DEV)\" -c Spatial_Presentation.cc -o Spatial_Presentation2D.o
+
+Sampled_Output.o Sampled_Output2D.o: Sampled_Output.cc Sampled_Output.hh Network_Generated_Statistics.hh Color_Table.hh Spatial_Presentation.hh Command_Line_Parameters.hh spatial.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -DFIG2DEV=\"$(FIG2DEV)\" -c Sampled_Output.cc -o Sampled_Output.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -DFIG2DEV=\"$(FIG2DEV)\" -c Sampled_Output.cc -o Sampled_Output2D.o
+
+Color_Table.o: Color_Table.cc Color_Table.hh Fig_Object.hh Command_Line_Parameters.hh global.hh BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Color_Table.cc -o Color_Table.o
+
+Fig_Object.o: Fig_Object.cc Fig_Object.hh BigString.hh diagnostic.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Fig_Object.cc -o Fig_Object.o
+
+Txt_Object.o: Txt_Object.cc Txt_Object.hh global.hh BigString.hh diagnostic.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c Txt_Object.cc -o Txt_Object.o
+
+VRML_Object.o: VRML_Object.cc VRML_Object.hh global.hh spatial.hh BigString.hh diagnostic.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c VRML_Object.cc -o VRML_Object.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c VRML_Object.cc -o VRML_Object2D.o
+
+Catacomb_Object.o: Catacomb_Object.cc Catacomb_Object.hh global.hh network.hh spatial.hh BigString.hh diagnostic.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c Catacomb_Object.cc -o Catacomb_Object.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c Catacomb_Object.cc -o Catacomb_Object2D.o
+
+slice.o: slice.cc slice.hh spatial.hh Command_Line_Parameters.hh global.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -c slice.cc -o slice.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -c slice.cc -o slice2D.o
+
+nibr.o nibr2D.o: nibr.cc nibr.hh network.hh synapse.hh synapse_formation_model.hh axon_direction_model.hh environment_physics.hh Command_Line_Parameters.hh Sampled_Output.hh Spatial_Presentation.hh file.hh spatial.hh event.hh slice.hh diagnostic.hh BigString.hh BigRegex.hh mtprng.hh regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR3D -DFIG2DEV=\"$(FIG2DEV)\" -c nibr.cc -o nibr.o
+ $(CCPP) $(CPPFLAGS) $(COLORS) -DVECTOR2D -DFIG2DEV=\"$(FIG2DEV)\" -c nibr.cc -o nibr2D.o
+
+wizard.o: wizard.cc wizard.hh StringList.hh BigString.hh BigRegex.hh regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c wizard.cc -o wizard.o
+
+nibr: nibr.o Txt_Object.o VRML_Object.o Catacomb_Object.o Fig_Object.o Color_Table.o Sampled_Output.o Spatial_Presentation.o Network_Generated_Statistics.o Results.o Command_Line_Parameters.o Command.o Spatial_Segment_Subset.o Network_Statistics.o Connection_Statistics.o prepost_structure.o fibre_structure.o synapse_structure.o generic_synapse.o dendritic_growth_model.o synapse_formation_model.o branching_models.o turning_models.o axon_direction_model.o fibre_elongation_model.o neurite_diameter_model.o environment_physics.o connection.o synapse.o IFactivity.o neuron.o network.o spatial.o event.o slice.o StringList.o file.o state_storable.o global.o diagnostic.o BigString.o BigRegex.o mtprng.o regex-gnu.o
+ @echo "Design rule: Add only the physiology required by function."
+ @echo " ___connected neurons (connection)"
+ @echo " _____individual synapses (synapse)"
+ @echo " _______presynaptic and postsynaptic nodes and branches"
+ @echo " _________terminals, receptive zones/spines, soma, axon hillock"
+ $(CCPP) $(CPPFLAGS) nibr.o Txt_Object.o VRML_Object.o Catacomb_Object.o Fig_Object.o Color_Table.o Sampled_Output.o Spatial_Presentation.o Network_Generated_Statistics.o Results.o Command_Line_Parameters.o Command.o Spatial_Segment_Subset.o Network_Statistics.o Connection_Statistics.o prepost_structure.o fibre_structure.o synapse_structure.o generic_synapse.o dendritic_growth_model.o synapse_formation_model.o branching_models.o turning_models.o axon_direction_model.o fibre_elongation_model.o neurite_diameter_model.o environment_physics.o connection.o synapse.o IFactivity.o neuron.o network.o spatial.o event.o slice.o StringList.o file.o state_storable.o global.o diagnostic.o BigString.o BigRegex.o mtprng.o regex-gnu.o -lgeometry -o netmorph $(LIB_PATH)
+ ln -f -s netmorph nibr
+
+nibr2D: nibr2D.o Txt_Object.o VRML_Object2D.o Catacomb_Object2D.o Fig_Object.o Color_Table.o Sampled_Output2D.o Spatial_Presentation2D.o Network_Generated_Statistics.o Results.o Command_Line_Parameters.o Command.o Spatial_Segment_Subset2D.o Network_Statistics2D.o Connection_Statistics2D.o prepost_structure2D.o fibre_structure2D.o synapse_structure2D.o generic_synapse.o dendritic_growth_model2D.o synapse_formation_model2D.o branching_models2D.o turning_models2D.o axon_direction_model2D.o fibre_elongation_model2D.o neurite_diameter_model2D.o environment_physics2D.o connection2D.o synapse2D.o IFactivity2D.o neuron2D.o network2D.o spatial2D.o event2D.o slice2D.o StringList.o file.o state_storable.o global.o diagnostic.o BigString.o BigRegex.o mtprng.o regex-gnu.o
+ @echo "Design rule: Add only the physiology required by function."
+ @echo " ___connected neurons (connection)"
+ @echo " _____individual synapses (synapse)"
+ @echo " _______presynaptic and postsynaptic nodes and branches"
+ @echo " _________terminals, receptive zones/spines, soma, axon hillock"
+ $(CCPP) $(CPPFLAGS) nibr2D.o Txt_Object.o VRML_Object2D.o Catacomb_Object2D.o Fig_Object.o Color_Table.o Sampled_Output2D.o Spatial_Presentation2D.o Network_Generated_Statistics.o Results.o Command_Line_Parameters.o Command.o Spatial_Segment_Subset2D.o Network_Statistics2D.o Connection_Statistics2D.o prepost_structure2D.o fibre_structure2D.o synapse_structure2D.o generic_synapse.o dendritic_growth_model2D.o synapse_formation_model2D.o branching_models2D.o turning_models2D.o axon_direction_model2D.o fibre_elongation_model2D.o neurite_diameter_model2D.o environment_physics2D.o connection2D.o synapse2D.o IFactivity2D.o neuron2D.o network2D.o spatial2D.o event2D.o slice2D.o StringList.o file.o state_storable.o global.o diagnostic.o BigString.o BigRegex.o mtprng.o regex-gnu.o -lgeometry -o netmorph2D $(LIB_PATH)
+ ln -f -s netmorph2D nibr2D
+
+wizard: wizard.o StringList.o BigString.o BigRegex.o regex-gnu.o
+ $(CCPP) $(CPPFLAGS) wizard.o StringList.o BigString.o BigRegex.o regex-gnu.o -o wizard $(LIB_PATH)
+
+clean:
+ rm -r -f *.o $(NAME)
+ ln -s $(HOME)/src/dil2al/BigString.o
+ ln -s $(HOME)/src/dil2al/BigRegex.o
+ ln -s $(HOME)/src/dil2al/regex-gnu.o
+
diff --git a/dil2al/Makefile b/dil2al/Makefile
index 0b6200b..3e1b82d 100644
--- a/dil2al/Makefile
+++ b/dil2al/Makefile
@@ -26,10 +26,10 @@ INCLUDES= -I$(HOME)/src/include
## -----------------
## aurora (x86):
MACHSPEC=
-MACHSTR=x86
-GCCTUNE=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[4-9][.]"),-mtune=pentium4)
+MACHSTR=
+GCCTUNE=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[4-9][.]"),-mtune=native)
#MACHOPT=
-MACHOPT=-march=pentium4 $(GCCTUNE) -mfpmath=sse
+MACHOPT=-march=native $(GCCTUNE) -mfpmath=sse
##
## kenji (SUN Ultra):
#MACHSPEC= -DSUN_RX
@@ -54,8 +54,8 @@ RXSPECIAL=-Wno-error
GCC3FXTRA=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[3-9][.]"),-Wno-unused-function)
ALT_REGEX=regex-gnu.o
ALT_REGEX_H=\"regex-gnu.h\"
-CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Werror -Wno-char-subscripts $(GCC3FXTRA)
-CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) $(MACHOPT) -mieee-fp -ffast-math -D_USE_ALT_REGEX -D_CPP_REGEX -DDEFAULTHOMEDIR=\"$(HOME)\" -pedantic -Wall -Werror $(GCC3FXTRA) $(CPPTEMPWORKAROUND)
+CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA)
+CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) $(MACHOPT) -mieee-fp -ffast-math -D_USE_ALT_REGEX -D_CPP_REGEX -DDEFAULTHOMEDIR=\"$(HOME)\" -pedantic -Wall $(GCC3FXTRA) $(CPPTEMPWORKAROUND)
REGEXSTR=regex-gnu_for_C++
##
## rx.h:
diff --git a/dil2al/Makefile.mac b/dil2al/Makefile.mac
new file mode 100644
index 0000000..4bd0888
--- /dev/null
+++ b/dil2al/Makefile.mac
@@ -0,0 +1,193 @@
+#
+# Makefile for dil2al
+# (by Randal A. Koene, randalk@minduploading.org)
+#
+# Instructions to insure a successful make:
+# 1. Insure that LIB_PATH points to the directory in which
+# -X11 and -Xext libraries can be found
+# 2. Edit the include paths (e.g. -I/usr/openwin/include) in
+# CPPFLAGS to refelect the correct location of g++, -X11
+# and -Xext include files
+# 3. Make sure the dynamic shared libraries can be located by
+# ld.so.1 at runtime (e.g. define an environment variable
+# setenv LD_LIBRARY_PATH "/usr/openwin/lib")
+
+##########################################################
+## Compiler
+## --------
+CC=gcc
+CCPP=g++
+##########################################################
+
+INCLUDES= -I$(HOME)/src/include
+
+##########################################################
+## Machine selection
+## -----------------
+## aurora (x86):
+MACHSPEC=
+MACHSTR=
+GCCTUNE=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[4-9][.]"),-mtune=native)
+#MACHOPT=
+MACHOPT=$(GCCTUNE) -mfpmath=sse
+##
+## kenji (SUN Ultra):
+#MACHSPEC= -DSUN_RX
+#MACHSTR=SUN
+##
+##########################################################
+
+### Attempting a temporary fix for gcc 4.x compilation of dil2al
+### (This should be replaced by actual source code modification.)
+CPPTEMPWORKAROUND=-fno-access-control
+RXSPECIAL=-Wno-error
+
+##########################################################
+## Regular Expression Library
+## --------------------------
+## (Suggestion: Using regex-gnu.h guarantees the greatest
+## amount of compatibility and identical behaviour on all
+## platforms, since it is included with the dil2al source
+## code and has been adapted for reliable use with C++.)
+##
+## regex-gnu.h adapted for integration with C++:
+GCC3FXTRA=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[3-9][.]"),-Wno-unused-function)
+ALT_REGEX=regex-gnu.o
+ALT_REGEX_H=\"regex-gnu.h\"
+CFXTRA= -D__DIL2AL__ -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA)
+CPPXTRA= -D__DIL2AL__ -D_ALT_REGEX_H=$(ALT_REGEX_H) $(MACHOPT) -mieee-fp -ffast-math -D_USE_ALT_REGEX -D_CPP_REGEX -DDEFAULTHOMEDIR=\"$(HOME)\" -pedantic -Wall $(GCC3FXTRA) $(CPPTEMPWORKAROUND)
+REGEXSTR=regex-gnu_for_C++
+##
+## rx.h:
+#ALT_REGEX=rx.o
+#ALT_REGEX_H=
+#CFXTRA= -D__DIL2AL__
+#CPPXTRA= -D__DIL2AL__ -D_BIGREGEX_HAS_RM_SPEP
+#REGEXSTR=rx
+##
+## generic GNU regex (Linux/GNU specific):
+#ALT_REGEX=regex.o
+#ALT_REGEX_H=regex.h
+#CFXTRA=
+#CPPXTRA= -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D__DIL2AL__ -D_BIGREGEX_HAS_RM_SPEP
+#REGEXSTR=regex
+##
+## system <regex.h> (SUN specific):
+#ALT_REGEX=
+#ALT_REGEX_H=
+#CFXTRA= -DSYSTEM_RX
+#CPPXTRA= -D__DIL2AL__ -DSYSTEM_RX
+#REGEXSTR=system
+##########################################################
+
+##########################################################
+## Safe Regular Expressions
+## ------------------------
+## assume '\0' within String length and rm structure has
+## no sp/ep pointers:
+#SAFEREGEX=
+## make no assumptions:
+SAFEREGEX= -D_BIGREGEX_SAFE_MATCHES
+##########################################################
+
+##########################################################
+## Compiler Options
+## ----------------
+## debugging information:
+#COMPOPT= -g
+#OPTSTR=debugging_info
+## generate profile information for use with gprof:
+#COMPOPT= -g -O6
+#OPTSTR=profiling
+## optimized:
+COMPOPT= -O3
+OPTSTR=optimized
+##########################################################
+
+##########################################################
+## C++ Specific Compiler Options
+## -----------------------------
+## debugging information:
+#CPPOPT=
+## generate profile information for use with gprof:
+#CPPOPT=
+## optimized:
+CPPOPT= -felide-constructors
+## uncomment the following optimization option only if
+## you have an older C++ compiler that does not optimize
+## return values unless explicitly told to do so with
+## the now deprecated `named return value' extension:
+#CPPOPT= $(CPPOPT) -D_USE_NAMED_RETURN_VALUE_EXTENSION
+##########################################################
+
+CFLAGS= $(COMPOPT) $(MACHSPEC) $(CFXTRA)
+CPPFLAGS= $(COMPOPT) $(CPPOPT) $(MACHSPEC) $(CPPXTRA) $(SAFEREGEX) $(INCLUDES)
+
+.INIT:
+ @echo '-------------------------------------------------------------------'
+ @echo 'Compilation options: $(MACHSTR), $(OPTSTR), $(REGEXSTR)'
+ @echo '-------------------------------------------------------------------'
+
+all: dil2al
+
+dil2al.o: dil2al.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c dil2al.cc -o dil2al.o
+
+alcomp.o: alcomp.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c alcomp.cc -o alcomp.o
+
+diladmin.o: diladmin.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c diladmin.cc -o diladmin.o
+
+utilities.o: utilities.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c utilities.cc -o utilities.o
+
+tladmin.o: tladmin.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c tladmin.cc -o tladmin.o
+
+note.o: note.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c note.cc -o note.o
+
+controller.o: controller.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c controller.cc -o controller.o
+
+tlfilter.o: tlfilter.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c tlfilter.cc -o tlfilter.o
+
+ppfilter.o: ppfilter.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c ppfilter.cc -o ppfilter.o
+
+search.o: search.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c search.cc -o search.o
+
+finances.o: finances.cc dil2al.hh BigString.hh BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c finances.cc -o finances.o
+
+cksum.o: cksum.cc cksum.hh BigString.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c cksum.cc -o cksum.o
+
+BigString.o: BigString.cc BigString.hh
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c BigString.cc -o BigString.o
+
+BigRegex.o: BigRegex.cc BigRegex.hh rx.h regex.h regex-gnu.h
+ $(CCPP) $(CPPFLAGS) $(COLORS) -c BigRegex.cc -o BigRegex.o
+
+regex.o: regex.c regex.h
+ $(CC) $(CFLAGS) -c regex.c -o regex.o
+
+regex-gnu.o: regex-gnu.c regex-gnu.h
+ $(CCPP) $(CFLAGS) -c regex-gnu.c -o regex-gnu.o
+
+rx.o: rx.c rx.h
+ $(CC) $(CFLAGS) $(COLORS) $(RXSPECIAL) -c rx.c -o rx.o
+
+dil2al: dil2al.o alcomp.o diladmin.o utilities.o tladmin.o note.o controller.o tlfilter.o ppfilter.o search.o finances.o cksum.o BigString.o BigRegex.o regex-gnu.o regex.o rx.o
+ $(CCPP) $(CPPFLAGS) dil2al.o alcomp.o diladmin.o utilities.o tladmin.o note.o controller.o tlfilter.o ppfilter.o search.o finances.o cksum.o $(ALT_REGEX) BigString.o BigRegex.o -o dil2al $(LIB_PATH)
+
+clean:
+ rm -r -f *.o $(NAME)
+
+doc++:
+ rm -r -f html
+ doc++ -d html spiker.dxx
+
diff --git a/fibre_structure.hh b/fibre_structure.hh
index 846cc0f..d2fe911 100644
--- a/fibre_structure.hh
+++ b/fibre_structure.hh
@@ -28,6 +28,8 @@
// Classes that define fibre structure and functions that apply both to
// presynaptic (axonal) and postsynaptic (dendritic) fibre structure..
+// [Update AC 201110322:] Added APICAL flag to fibre_segment
+
#ifndef __FIBRE_STRUCTURE_HH
#include <unistd.h>
#include <math.h>
@@ -157,6 +159,7 @@ protected:
// *** I can make this able to have more than one branch, or I can
// create different classes for that and change fibre_structure from
// inheriting fibre_segment to linking to a type of fibre_segment.
+ int APICAL;
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
double diameter; // [***NOTE] I can (a) replace this with a pointer to a bunch of specialized data, or (b) used derived classes such as the "solid" classes defined below.
#endif
@@ -166,17 +169,17 @@ protected:
}
public:
#ifdef VECTOR3D
- fibre_segment(neuron & _n, fibre_segment * p, extra_fibre_data & efd): n(&_n), d(efd), parent(p), branch1(NULL), branch2(NULL)
+ fibre_segment(neuron & _n, fibre_segment * p, extra_fibre_data & efd): n(&_n), d(efd), parent(p), branch1(NULL), branch2(NULL), APICAL(parent->APICAL)
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
, diameter(0.0)
#endif
{ fibre_segment_initialization(); }
- fibre_segment(neuron & _n, fibre_segment * p, extra_fibre_data & efd, Segment & s): Segment(s), n(&_n), d(efd), parent(p), branch1(NULL), branch2(NULL)
+ fibre_segment(neuron & _n, fibre_segment * p, extra_fibre_data & efd, Segment & s, int AP): Segment(s), n(&_n), d(efd), parent(p), branch1(NULL), branch2(NULL), APICAL(AP)
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
, diameter(0.0)
#endif
{ fibre_segment_initialization(); }
- fibre_segment(neuron & _n, fibre_segment * p, extra_fibre_data & efd, spatial & segstart, spatial & segend): Segment(segstart,segend), n(&_n), d(efd), parent(p), branch1(NULL), branch2(NULL)
+ fibre_segment(neuron & _n, fibre_segment * p, extra_fibre_data & efd, spatial & segstart, spatial & segend): Segment(segstart,segend), n(&_n), d(efd), parent(p), branch1(NULL), branch2(NULL), APICAL(parent->APICAL)
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
, diameter(0.0)
#endif
@@ -189,17 +192,17 @@ public:
fibre_segment * continuation_node_to_branch(extra_fibre_data & efd);
#endif
#ifdef VECTOR2D
- fibre_segment(neuron & _n, fibre_segment * p): n(&_n), parent(p), branch1(NULL), branch2(NULL)
+ fibre_segment(neuron & _n, fibre_segment * p): n(&_n), parent(p), branch1(NULL), branch2(NULL), APICAL(parent->APICAL)
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
, diameter(0.0)
#endif
{}
- fibre_segment(neuron & _n, fibre_segment * p, Segment & s): Segment(s), n(&_n), parent(p), branch1(NULL), branch2(NULL)
+ fibre_segment(neuron & _n, fibre_segment * p, Segment & s, int AP): Segment(s), n(&_n), parent(p), branch1(NULL), branch2(NULL), APICAL(AP)
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
, diameter(0.0)
#endif
{}
- fibre_segment(neuron & _n, fibre_segment * p, spatial & segstart, spatial & segend): Segment(segstart,segend), n(&_n), parent(p), branch1(NULL), branch2(NULL)
+ fibre_segment(neuron & _n, fibre_segment * p, spatial & segstart, spatial & segend): Segment(segstart,segend), n(&_n), parent(p), branch1(NULL), branch2(NULL), APICAL(parent->APICAL)
#ifdef INCLUDE_SIMPLE_FIBER_DIAMETER
, diameter(0.0)
#endif
@@ -372,15 +375,21 @@ public:
// postsynaptic_structure assures that elmodel is valid.
#ifdef VECTOR3D
fibre_structure(neuron & _n): fibre_segment(_n,NULL,root_efd), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
- fibre_structure(neuron & _n, Segment & s): fibre_segment(_n,NULL,root_efd,s), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
+
+ fibre_structure(neuron & _n, Segment & s, int AP): fibre_segment(_n,NULL,root_efd,s,AP), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
+
fibre_structure(neuron & _n, spatial & segstart, spatial & segend): fibre_segment(_n,NULL,root_efd,segstart,segend), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
- fibre_structure(neuron & _n, Segment & s, spatial & acoords): fibre_segment(_n,NULL,root_efd,s), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this,acoords)); }
+
+ fibre_structure(neuron & _n, Segment & s, spatial & acoords, int AP): fibre_segment(_n,NULL,root_efd,s,AP), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this,acoords)); }
#endif
#ifdef VECTOR2D
fibre_structure(neuron & _n): fibre_segment(_n,NULL), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
- fibre_structure(neuron & _n, Segment & s): fibre_segment(_n,NULL,s), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
+
+ fibre_structure(neuron & _n, Segment & s, int AP): fibre_segment(_n,NULL,s,AP), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
+
fibre_structure(neuron & _n, spatial & segstart, spatial & segend): fibre_segment(_n,NULL,segstart,segend), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
- fibre_structure(neuron & _n, Segment & s, spatial & acoords): fibre_segment(_n,NULL,s), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this,acoords)); }
+
+ fibre_structure(neuron & _n, Segment & s, spatial & acoords, int AP): fibre_segment(_n,NULL,s,AP), terminalsegmentsarray(NULL), terminalarraylength(0), elmodel(NULL), bmmodel(NULL), sum_l_i_cache(0.0), sum_l_i_cache_t(eq->T()), colnum(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this,acoords)); }
#endif
//fibre_structure(double a, double l): fibre_segment(a,l), terminalsegmentsarray(NULL), terminalarraylength(0), cache(0.0) { terminalsegments.link_before(new terminal_segment(*this,*this)); }
virtual ~fibre_structure() { delete[] terminalsegmentsarray; if (elmodel) delete elmodel; if (bmmodel) delete bmmodel; }
diff --git a/geometry/Makefile b/geometry/Makefile
index d5094bc..b5e7a61 100644
--- a/geometry/Makefile
+++ b/geometry/Makefile
@@ -5,12 +5,12 @@ CC=gcc
CCPP=g++
#MACHOPT=
-MACHOPT=-march=pentium4 -mtune=pentium4 -mfpmath=sse
+MACHOPT=-march=native -mtune=native -mfpmath=sse
GCC3FXTRA=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[3-9][.]"),-Wno-unused-function)
-CFXTRA= -DSTDC_HEADERS -pedantic -Wall -Werror -Wno-char-subscripts $(GCC3FXTRA)
-CPPXTRA= -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall -Werror $(GCC3FXTRA)
+CFXTRA= -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA)
+CPPXTRA= -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall $(GCC3FXTRA)
COMPOPT= -O3
CPPOPT= -felide-constructors
diff --git a/geometry/Makefile.mac b/geometry/Makefile.mac
new file mode 100644
index 0000000..3587e70
--- /dev/null
+++ b/geometry/Makefile.mac
@@ -0,0 +1,60 @@
+# Makefile for geometry classes
+# Randal A. Koene, 20050112
+
+CC=gcc
+CCPP=g++
+
+#MACHOPT=
+MACHOPT=-mtune=native -mfpmath=sse
+
+GCC3FXTRA=$(if $(shell gcc -v 2>&1 | grep "^gcc version[^0-9]*[3-9][.]"),-Wno-unused-function)
+
+CFXTRA= -DSTDC_HEADERS -pedantic -Wall -Wno-char-subscripts $(GCC3FXTRA)
+CPPXTRA= -D_ALT_REGEX_H=$(ALT_REGEX_H) -D_USE_ALT_REGEX -D_CPP_REGEX $(MACHOPT) -mieee-fp -ffast-math -pedantic -Wall $(GCC3FXTRA)
+
+COMPOPT= -O3
+CPPOPT= -felide-constructors
+
+CFLAGS= $(COMPOPT) $(CFXTRA)
+CPPFLAGS= $(COMPOPT) $(CPPOPT) $(CPPXTRA)
+
+#.c.o:
+# g++ -c -g $<
+
+#HDR = common.h point.h vector.h
+#SRC = point.c vector.c
+#OBJ = point.o vector.o
+LIB = libgeometry.a
+TAR = geometry.tar
+
+all: $(LIB)
+
+Point3D.o: Point3D.cc Point3D.hh Vector3D.hh
+ $(CCPP) $(CPPFLAGS) -c Point3D.cc -o Point3D.o
+
+Vector3D.o: Vector3D.cc Vector3D.hh Point3D.hh
+ $(CCPP) $(CPPFLAGS) -c Vector3D.cc -o Vector3D.o
+
+Point2D.o: Point2D.cc Point2D.hh Vector2D.hh
+ $(CCPP) $(CPPFLAGS) -c Point2D.cc -o Point2D.o
+
+Vector2D.o: Vector2D.cc Vector2D.hh Point2D.hh
+ $(CCPP) $(CPPFLAGS) -c Vector2D.cc -o Vector2D.o
+
+ptest: ptest.c $(LIB)
+ g++ -o ptest ptest.c $(LIB)
+
+vtest: vtest.c $(LIB)
+ g++ -o vtest vtest.c $(LIB)
+
+$(LIB): Point3D.o Vector3D.o Point2D.o Vector2D.o
+ ar rcsv $(LIB) Point3D.o Vector3D.o Point2D.o Vector2D.o
+
+tar: $(TAR)
+$(TAR): Readme Makefile *.hh *.cc
+ tar cvf $(TAR) Readme Makefile *.hh *.cc
+
+bare: clean
+ rm -f $(LIB)
+clean:
+ rm -f *.o $(TAR)
diff --git a/install.sh b/install.sh
index 63df057..2d68253 100755
--- a/install.sh
+++ b/install.sh
@@ -121,11 +121,11 @@ if [ $machinespec -eq 1 ]; then
else
if [ $machinespec -eq 2 ]; then
# Linux64
- sed 's/MACHSTR=x86/#MACHSTR=x86/g' Makefile.linux > Makefile
+ sed 's/MACHSTR=x86_64/#MACHSTR=x86_64/g' Makefile.linux > Makefile
else
if [ $machinespec -eq 3 ]; then
# Mac
- sed 's/MACHSTR=x86/#MACHSTR=x86/g; s/^\(INCLUDES=.*\)$/\1 -I.\/mac/g' Makefile.linux > Makefile
+ sed 's/MACHSTR=x86_64/#MACHSTR=x86_64/g; s/^\(INCLUDES=.*\)$/\1 -I.\/mac/g' Makefile.mac > Makefile
else
if [ $machinespec -eq 4 ]; then
# Cygwin
@@ -175,8 +175,13 @@ else
mv -f dil2al/* ~/src/dil2al/
cd ~/src/dil2al
-
- # in case of older versions
+
+ if [ $machinespec -eq 3 ]; then
+ # Mac
+ sed 's/MACHSTR=x86_64/#MACHSTR=x86_64/g; s/^\(INCLUDES=.*\)$/\1 -I.\/mac/g' Makefile.mac > Makefile
+ fi
+
+ # in case of older versions
make clean
# new dependencies
ln -s regex-gnu.c regex.c
@@ -189,6 +194,12 @@ fi
cd ~/src/geometry
+if [ $machinespec -eq 3 ]; then
+ # Mac
+ sed 's/MACHSTR=x86_64/#MACHSTR=x86_64/g; s/^\(INCLUDES=.*\)$/\1 -I.\/mac/g' Makefile.mac > Makefile
+fi
+
+
# in case of older versions
make clean
# new dependencies
diff --git a/nibr.cc b/nibr.cc
index cd4816f..a131c4a 100644
--- a/nibr.cc
+++ b/nibr.cc
@@ -1348,21 +1348,77 @@ int main(int argc, char * argv[]) {
outputdirectory += dstr;
// At this point "outputdirectory" is fully available
- if ((n=clp.Specifies_Parameter("warnings_on"))>=0) if (downcase(clp.ParValue(n))==String("off")) warnings_on = WARN_OFF;
- else if (downcase(clp.ParValue(n))==String("stdout")) warnings_on = WARN_STDOUT;
- else if (downcase(clp.ParValue(n))==String("stdoutfile")) warnings_on = WARN_STDOUTFILE;
- else if (downcase(clp.ParValue(n))==String("file")) warnings_on = WARN_FILE;
- if (warnings_on>WARN_STDOUT) warningfile = outputdirectory + "warnings";
- if ((n=clp.Specifies_Parameter("reports_on"))>=0) if (downcase(clp.ParValue(n))==String("off")) reports_on = WARN_OFF;
- else if (downcase(clp.ParValue(n))==String("stdout")) reports_on = WARN_STDOUT;
- else if (downcase(clp.ParValue(n))==String("stdoutfile")) reports_on = WARN_STDOUTFILE;
- else if (downcase(clp.ParValue(n))==String("file")) reports_on = WARN_FILE;
- if (reports_on>WARN_STDOUT) reportfile = outputdirectory + "report";
- if ((n=clp.Specifies_Parameter("progress_on"))>=0) if (downcase(clp.ParValue(n))==String("off")) progress_on = WARN_OFF;
- else if (downcase(clp.ParValue(n))==String("stdout")) progress_on = WARN_STDOUT;
- else if (downcase(clp.ParValue(n))==String("stdoutfile")) progress_on = WARN_STDOUTFILE;
- else if (downcase(clp.ParValue(n))==String("file")) progress_on = WARN_FILE;
- if (progress_on>WARN_STDOUT) progressfile = outputdirectory + "progress";
+ if ((n=clp.Specifies_Parameter("warnings_on"))>=0)
+ {
+ if (downcase(clp.ParValue(n))==String("off"))
+ {
+ warnings_on = WARN_OFF;
+ }
+ else if (downcase(clp.ParValue(n))==String("stdout"))
+ {
+ warnings_on = WARN_STDOUT;
+ }
+ else if (downcase(clp.ParValue(n))==String("stdoutfile"))
+ {
+ warnings_on = WARN_STDOUTFILE;
+ }
+ else if (downcase(clp.ParValue(n))==String("file"))
+ {
+ warnings_on = WARN_FILE;
+ }
+ }
+ if (warnings_on>WARN_STDOUT)
+ {
+ warningfile = outputdirectory + "warnings";
+ }
+
+ if ((n=clp.Specifies_Parameter("reports_on"))>=0)
+ {
+ if (downcase(clp.ParValue(n))==String("off"))
+ {
+ reports_on = WARN_OFF;
+ }
+ else if (downcase(clp.ParValue(n))==String("stdout"))
+ {
+ reports_on = WARN_STDOUT;
+ }
+ else if (downcase(clp.ParValue(n))==String("stdoutfile"))
+ {
+ reports_on = WARN_STDOUTFILE;
+ }
+ else if (downcase(clp.ParValue(n))==String("file"))
+ {
+ reports_on = WARN_FILE;
+ }
+ }
+ if (reports_on>WARN_STDOUT)
+ {
+ reportfile = outputdirectory + "report";
+ }
+
+ if ((n=clp.Specifies_Parameter("progress_on"))>=0)
+ {
+ if (downcase(clp.ParValue(n))==String("off"))
+ {
+ progress_on = WARN_OFF;
+ }
+ else if (downcase(clp.ParValue(n))==String("stdout"))
+ {
+ progress_on = WARN_STDOUT;
+ }
+ else if (downcase(clp.ParValue(n))==String("stdoutfile"))
+ {
+ progress_on = WARN_STDOUTFILE;
+ }
+ else if (downcase(clp.ParValue(n))==String("file"))
+ {
+ progress_on = WARN_FILE;
+ }
+ }
+ if (progress_on>WARN_STDOUT)
+ {
+ progressfile = outputdirectory + "progress";
+ }
report_compiler_directives();
reliability_checklist();
diff --git a/prepost_structure.cc b/prepost_structure.cc
index edfda66..f781b6f 100644
--- a/prepost_structure.cc
+++ b/prepost_structure.cc
@@ -33,6 +33,7 @@
#include "Command_Line_Parameters.hh"
// [UPDATE 20080702:] The case in which we define INCLUDE_SCHEMA_PARENT_SET_PROTOCOL_DIRECTION_MODELS is now REQUIRED for compilation.
+// [UPDATE AC 20110322:] Added _typeid to fibre_structure to enable distinction between Apical and Basal dendrites.
natural_schema_parent_set axons_most_specific_natural_set[UNTYPED_NEURON+1] = {
all_axons_sps,
@@ -43,7 +44,7 @@ natural_schema_parent_set axons_most_specific_natural_set[UNTYPED_NEURON+1] = {
all_axons_sps
};
-presynaptic_structure::presynaptic_structure(neuron & _n, Segment & initseg, spatial & acoords, int _typeid): fibre_structure(_n,initseg,acoords) {
+presynaptic_structure::presynaptic_structure(neuron & _n, Segment & initseg, spatial & acoords, int _typeid): fibre_structure(_n,initseg,acoords, _typeid) {
// If a general or specific parameter settings so indicate, the terminal
// segment created in this constructor can be associated with a direction
// model.
@@ -108,7 +109,7 @@ natural_schema_parent_set dendrites_most_specific_natural_set[UNTYPED_NEURON+1]
all_dendrites_sps
};
-postsynaptic_structure::postsynaptic_structure(neuron & _n, Segment & initseg, spatial & acoords, int _typeid): fibre_structure(_n,initseg,acoords) {
+postsynaptic_structure::postsynaptic_structure(neuron & _n, Segment & initseg, spatial & acoords, int _typeid): fibre_structure(_n,initseg,acoords, _typeid) {
// If a general or specific parameter settings so indicate, the terminal
// segment created in this constructor can be associated with a direction
// model.
diff --git a/synapse.cc b/synapse.cc
index 1276b08..27f22af 100644
--- a/synapse.cc
+++ b/synapse.cc
@@ -25,11 +25,14 @@
// synapse.cc
// Randal A. Koene, 20041118
+// [Update AC 20110322:] Added include fibre_structure.hh and APICAL/BASAL flag write to .synapses file
+
#include "synapse.hh"
#include "synapse_structure.hh"
#include "connection.hh"
#include "Color_Table.hh"
#include "global.hh"
+#include "fibre_structure.hh"
synaptogenesis_data * SynaptoGenesis_Data = NULL;
@@ -149,7 +152,15 @@ Txt_Object * synapse::net_Txt() {
(*Txt_synapselist) += String((long) Presynaptic_Neuron());
(*Txt_synapselist) += ',';
(*Txt_synapselist) += String((long) Postsynaptic_Neuron());
- if (SynaptoGenesis_Data) (*Txt_synapselist) += String(SynaptoGenesis_Data->find_t_genesis(this),",%f\n");
+ if (SynaptoGenesis_Data) (*Txt_synapselist) += String(SynaptoGenesis_Data->find_t_genesis(this),",%f");
+ if(s->DendriteSegment()->APICAL == 6)
+ {
+ (*Txt_synapselist) += String(",APICAL\n");
+ }
+ else
+ {
+ (*Txt_synapselist) += String(",BASAL\n");
+ }
Txt_synapseindex++;
return NULL;
}
diff --git a/synapse_formation_model.cc b/synapse_formation_model.cc
index 1e8c302..4bc8957 100644..100755
--- a/synapse_formation_model.cc
+++ b/synapse_formation_model.cc
@@ -31,6 +31,7 @@
#include "synapse_structure.hh"
#include "synapse.hh"
#include "network.hh"
+#include "file.hh"
//#define DELAYED_SPECIFIC_PROXIMITY_THRESHOLDS
@@ -199,6 +200,8 @@ uniform_pdf defaultsfmpdf(X_synapses);
probability_distribution_function * sfmpdf = &defaultsfmpdf;
bool no_autapses = true;
+bool prev_conn_formed = false;
+
void general_synapse_formation_model_parameters_interface::parse_CLP(Command_Line_Parameters & clp) {
// [***NOTE] This does not yet include a facility for setting these
@@ -289,18 +292,283 @@ double synapse_formation_model::evaluate_possible_connection(fibre_segment * axo
#ifdef DELAYED_SPECIFIC_PROXIMITY_THRESHOLDS
double likelihood = 1.0 - (dist3D_Segment_to_Segment(*axonsegment,*dendritesegment,s)/proximitythreshold);
#else
- double mfd = maxfibredistance[axonsegment->N()->TypeID()][dendritesegment->N()->TypeID()];
- double likelihood = -1.0;
- if (mfd>=0.0) {
- double dsegseg = dist3D_Segment_to_Segment(*axonsegment,*dendritesegment,s);
- if (mfd==0.0) {
- if (dsegseg<0.00001) likelihood = 1.0;
- else likelihood = 0.0;
+double mfd = maxfibredistance[axonsegment->N()->TypeID()][dendritesegment->N()->TypeID()];
+double likelihood = -1.0;
+
+
+//"Crossing line-piece" synapse formation model:
+//A geometrical approach to synapse formation. For a detailed explanation see
+//SECO Year 2 report -- Grant agreement number 216593
+
+double dsegseg = dist3D_Segment_to_Segment(*axonsegment,*dendritesegment,s);
+
+//Initialise line-piece end points
+double Px = 0.0;
+double Py = 0.0;
+double Pz = 0.0;
+double Qx = 0.0;
+double Qy = 0.0;
+double Qz = 0.0;
+
+double Rx = 0.0;
+double Ry = 0.0;
+double Rz = 0.0;
+double Sx = 0.0;
+double Sy = 0.0;
+double Sz = 0.0;
+
+
+double px = 0.0;
+double py = 0.0;
+double pz = 0.0;
+double qx = 0.0;
+double qy = 0.0;
+double qz = 0.0;
+
+double rx = 0.0;
+double ry = 0.0;
+double rz = 0.0;
+double sx = 0.0;
+double sy = 0.0;
+double sz = 0.0;
+
+
+fibre_segment * axon_test_seg;// = axonsegment;
+fibre_segment * dendrite_test_seg;// = dendritesegment;
+
+axon_test_seg = axonsegment;
+dendrite_test_seg = dendritesegment;
+
+#ifdef VECTOR3D
+Px = axon_test_seg->P0.X();
+Py = axon_test_seg->P0.Y();
+Pz = axon_test_seg->P0.Z();
+Qx = axon_test_seg->P1.X();
+Qy = axon_test_seg->P1.Y();
+Qz = axon_test_seg->P1.Z();
+
+
+Rx = dendrite_test_seg->P0.X();
+Ry = dendrite_test_seg->P0.Y();
+Rz = dendrite_test_seg->P0.Z();
+Sx = dendrite_test_seg->P1.X();
+Sy = dendrite_test_seg->P1.Y();
+Sz = dendrite_test_seg->P1.Z();
+#endif
+
+
+
+//I
+//Perform spatial translation on axon and dendrite segments
+//Relocate segments: Express their coordinates by shifting the
+//x_0,y_0 point of the axon segment to the x=0,y=0,z=0 location.
+px = Px - Px;
+py = Py - Py;
+pz = Pz - Pz;
+qx = Qx - Px;
+qy = Qy - Py;
+qz = Qz - Pz;
+
+rx = Rx - Px;
+ry = Ry - Py;
+rz = Rz - Pz;
+sx = Sx - Px;
+sy = Sy - Py;
+sz = Sz - Pz;
+
+
+
+//II
+//First rotation: Rotate X2,Y2,Z2 coords of the axon segment into XY plane
+// Rotate X1,Y1,Z1 and X2,Y2,Z2 coords of dendrite segment accordingly
+double PQ = pow( (pow(abs(Px-Qx),2) + pow(abs(Py-Qy),2) + pow(abs(Pz-Qz),2) ), 0.5);
+double l = pow( (pow(PQ,2) - pow((Qz - Pz),2)), 0.5);
+
+
+double qx1;
+double qy1;
+double qz1;
+
+qx1 = l;
+qy1 = 0;
+qz1 = qz;
+
+double rx1;
+double ry1;
+double rz1;
+
+rx1 = ((rx*qx) + (ry*qy))/l;
+ry1 = ((-rx*qy) + (ry*qx))/l;
+rz1 = rz;
+
+double sx1;
+double sy1;
+double sz1;
+
+sx1 = ((sx*qx) + (sy*qy))/l;
+sy1 = ((-sx*qy) + (sy*qx))/l;
+sz1 = sz;
+
+
+
+//III
+//Second rotation around Y-axis of q2 onto X-axis
+
+double qx2;
+double qy2;
+double qz2;
+
+qx2 = PQ;
+qy2 = 0;
+qz2 = 0;
+
+
+double rx2;
+double ry2;
+double CR;
+double rz2;
+
+rx2 = ((rx*qx) + (ry*qy) + (rz*qz))/PQ;
+ry2 = ry1;
+CR = rx2;
+rz2 = ((-CR*qz) + (PQ*rz))/l;
+
+double sx2;
+double CS;
+double sy2;
+double sz2;
+
+sx2 = ((sx*qx)+(sy*qy)+(sz*qz))/PQ;
+CS = sx2;
+sy2 = ((-sx*qy)+(sy*qx))/l;
+sz2 = ((-CS*qz) + (PQ*sz))/l;
+
+
+
+//IV
+//Third rotation around X-axis
+
+double Or2_prime_sq;
+double Os2_prime_sq;
+
+double fv;
+
+Or2_prime_sq = pow(ry2,2) + pow(rz2,2);
+Os2_prime_sq = pow(sy2,2) + pow(sz2,2);
+fv = 0.5*( Or2_prime_sq - Os2_prime_sq )/( pow((ry2 - sy2),2) + pow((rz2 - sz2),2) ) + 0.5;
+
+
+if(abs(fv)<1e-10)
+{
+ fv = 0;
+}
+
+double Vy;
+double Vz;
+Vy = ry2 + fv*(sy2 - ry2);
+Vz = rz2 + fv*(sz2 - rz2);
+
+double lov;
+lov = pow((pow(Vy,2) + pow(Vz,2)),0.5);
+
+double rx3;
+rx3 = CR;
+
+double ry3;
+ry3 = ((ry2*Vy) +(rz2*Vz))/lov;
+
+
+double rz3;
+rz3 = ((ry2*-Vz) +(rz2*Vy))/lov;
+
+double sx3;
+sx3 = CS;
+
+double sy3;
+sy3 = ((sy2*Vy) +(sz2*Vz))/lov;
+
+double sz3;
+sz3 = ((sy2*-Vz) +(sz2*Vy))/lov;
+
+
+
+//V
+//Determine whether r3s3 intersects XY-plane
+bool CONDITION_A = false;
+bool CONDITION_B1 = false;
+bool CONDITION_B2 = false;
+if(rz3*sz3 < 0) //CONDITION A
+{
+ CONDITION_A = true;
+}
+
+
+double qx3 = PQ;
+
+
+if(rx3 > sx3) //CONDITION B1
+{
+ if(rx3 > 0 && sx3 < qx3)
+ {
+ CONDITION_B1 = true;
+ }
+}
+else if(sx3 > rx3)
+{
+ if(sx3 > 0 && rx3 < qx3)
+ {
+ CONDITION_B1 = true;
+ }
+}
+
+if(CONDITION_A == true && CONDITION_B1 ==true)
+{
+ double ux; //Interception point
+ ux = (CS*rz3 - CR*sz3)/(rz3-sz3);
+ double tx;
+
+ tx=ux;
+
+
+
+ if(ux >=0 && ux<= PQ) //Condidtion B2
+ {
+ CONDITION_B2 = true;
+ }
+
+
+ double frac_T_PQ = tx/qx;
+ double frac_U_RS = (ux - rx3)/(sx3 - rx3);
+
+ double Tx = Px + frac_T_PQ*(Qx - Px);
+ double Ty = Py + frac_T_PQ*(Qy - Py);
+ double Tz = Pz + frac_T_PQ*(Qz - Pz);
+
+ double Ux = Rx + frac_U_RS*(Sx - Rx);
+ double Uy = Ry + frac_U_RS*(Sy - Ry);
+ double Uz = Rz + frac_U_RS*(Sz - Rz);
+
+ double TU;
+ TU= pow((pow((Tx - Ux),2) + pow((Ty - Uy),2) + pow((Tz - Uz),2)),0.5);
+
+
+ if(mfd>=0.0)
+ {
+ //Set likelihood value for synapse formation between segments
+ if(CONDITION_A == true && CONDITION_B1 == true && CONDITION_B2 == true && TU <= mfd)
+ {
+ likelihood = 1.0;
+ }
+ else
+ {
+ likelihood = 0.0;
}
- else {
- likelihood = 1.0 - (dsegseg/mfd);
- }
}
+}
+else
+{
+ likelihood = 0.0;
+}
#endif
///if ((eq->T()>=101000.0) && (eq->T()<102000.0)) {
/// cout << "\nSYNEVAL: T=" << eq->T() << " axonsegment=" << (unsigned long) axonsegment << " dendritesegment=" << (unsigned long) dendritesegment;
@@ -312,9 +580,8 @@ double synapse_formation_model::evaluate_possible_connection(fibre_segment * axo
// established.
connectionptr c = axonsegment->N()->connect_to(dendritesegment->N());
new candidate_synapse(*c,likelihood,s);
- // ***synapse_inventory[syntype_iGluR][1]++;
return likelihood;
- }
+ }
///if ((eq->T()>=101000.0) && (eq->T()<102000.0)) cout << '\n'; cout.flush();
// plug a potential memory leak!
DIAGNOSTIC_BEFORE_ALLOCATION(new_synapse_structure);