ucl.physiol.neuroconstruct.project
Class GeneratedNetworkConnections

java.lang.Object
  extended by ucl.physiol.neuroconstruct.project.GeneratedNetworkConnections

public class GeneratedNetworkConnections
extends Object

Storage for network connection info generated when "Generate cell positions and network connections" button pressed. Note: this contains connections for both Morph based and volume based connections

Author:
Padraig Gleeson

Nested Class Summary
 class GeneratedNetworkConnections.SingleSynapticConnection
           
 
Field Summary
static int ANY_NETWORK_CONNECTION
           
static int COMPLEX_NETWORK_CONNECTION
           
static int MORPH_NETWORK_CONNECTION
           
static int VOL_NETWORK_CONNECTION
           
 
Constructor Summary
GeneratedNetworkConnections(Project project)
           
 
Method Summary
 void addSynapticConnection(String netConnectionName, int sourceCellNumber, int targetCellNumber)
          todo Add more funcs for python
 void addSynapticConnection(String netConnectionName, int connectionType, int sourceCellNumber, int sourceCellSegmentIndex, float sourceCellDisplacement, int targetCellNumber, int targetCellSgmentIndex, float targetCellDisplacement, float apPropDelay, ArrayList<ConnSpecificProps> props)
           
 boolean areConnected(String netConnectionName, int sourceCellIndex, int targetCellIndex)
           
 String details()
           
 String details(boolean html)
           
 int[][] getConnectionMatrix(String netConnectionName, Project project)
           
 ArrayList<GeneratedNetworkConnections.SingleSynapticConnection> getConnsFromSource(String netConnectionName, int sourceCellIndex)
           
 ArrayList<GeneratedNetworkConnections.SingleSynapticConnection> getConnsToTarget(String netConnectionName, int targetCellIndex)
           
 String getHtmlReport(int connType, SimConfig simConfig)
           
 Iterator<String> getNamesNetConnsIter()
           
 ArrayList<String> getNamesNonEmptyNetConns()
           
 SimpleXMLEntity getNetworkMLElement(int unitSystem, boolean extraComments)
           
 ArrayList<SimpleXMLEntity> getNetworkMLElements(int unitSystem, boolean extraComments, NeuroMLConstants.NeuroMLVersion version)
           
 int getNumAllSynConns()
           
 int getNumberSynapticConnections(int connType)
           
 int getNumNonEmptyNetConns()
           
 ArrayList<Integer> getSourceCellIndices(String netConnectionName, int targetCellIndex, boolean uniqueValues)
          Gets the indices of all source cells already connected to this target cell
 ArrayList<GeneratedNetworkConnections.SingleSynapticConnection> getSynapticConnections(String netConnectionName)
           
 ArrayList<PostSynapticObject> getSynObjsPresent(String netConnName, String synapseType, int cellNumber, int segmentId)
          Gets all PostSynapticObjects for the specified synapse on the segment
 ArrayList<Integer> getTargetCellIndices(String netConnectionName, int sourceCellIndex, boolean uniqueValues)
          Gets the indices of all target cells already connected to this source cell
 void loadFromFile(File netConnFile)
           
static void main(String[] args)
           
 void reset()
           
 void saveToFile(File netConnFile)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MORPH_NETWORK_CONNECTION

public static final int MORPH_NETWORK_CONNECTION
See Also:
Constant Field Values

COMPLEX_NETWORK_CONNECTION

public static final int COMPLEX_NETWORK_CONNECTION
See Also:
Constant Field Values

VOL_NETWORK_CONNECTION

public static final int VOL_NETWORK_CONNECTION
See Also:
Constant Field Values

ANY_NETWORK_CONNECTION

public static final int ANY_NETWORK_CONNECTION
See Also:
Constant Field Values
Constructor Detail

GeneratedNetworkConnections

public GeneratedNetworkConnections(Project project)
Method Detail

reset

public void reset()

addSynapticConnection

public void addSynapticConnection(String netConnectionName,
                                  int sourceCellNumber,
                                  int targetCellNumber)
todo Add more funcs for python


addSynapticConnection

public void addSynapticConnection(String netConnectionName,
                                  int connectionType,
                                  int sourceCellNumber,
                                  int sourceCellSegmentIndex,
                                  float sourceCellDisplacement,
                                  int targetCellNumber,
                                  int targetCellSgmentIndex,
                                  float targetCellDisplacement,
                                  float apPropDelay,
                                  ArrayList<ConnSpecificProps> props)

getConnectionMatrix

public int[][] getConnectionMatrix(String netConnectionName,
                                   Project project)

getSynapticConnections

public ArrayList<GeneratedNetworkConnections.SingleSynapticConnection> getSynapticConnections(String netConnectionName)

getNamesNetConnsIter

public Iterator<String> getNamesNetConnsIter()

getNumAllSynConns

public int getNumAllSynConns()

getNumNonEmptyNetConns

public int getNumNonEmptyNetConns()

getNamesNonEmptyNetConns

public ArrayList<String> getNamesNonEmptyNetConns()

getNumberSynapticConnections

public int getNumberSynapticConnections(int connType)

getTargetCellIndices

public ArrayList<Integer> getTargetCellIndices(String netConnectionName,
                                               int sourceCellIndex,
                                               boolean uniqueValues)
Gets the indices of all target cells already connected to this source cell

Parameters:
netConnectionName - name of the net conn in question
sourceCellIndex - index of the cell which starts the connection
uniqueValues - if true only gives single instance of target cell index, even if there are two connections between the source cell and target

areConnected

public boolean areConnected(String netConnectionName,
                            int sourceCellIndex,
                            int targetCellIndex)

getConnsFromSource

public ArrayList<GeneratedNetworkConnections.SingleSynapticConnection> getConnsFromSource(String netConnectionName,
                                                                                          int sourceCellIndex)

getConnsToTarget

public ArrayList<GeneratedNetworkConnections.SingleSynapticConnection> getConnsToTarget(String netConnectionName,
                                                                                        int targetCellIndex)

getSourceCellIndices

public ArrayList<Integer> getSourceCellIndices(String netConnectionName,
                                               int targetCellIndex,
                                               boolean uniqueValues)
Gets the indices of all source cells already connected to this target cell

Parameters:
netConnectionName - name of the net conn in question
targetCellIndex - index of the cell which terminates the connection
uniqueValues - if true only gives single instance of target cell index, even if there are two connections between the source cell and target

toString

public String toString()
Overrides:
toString in class Object

details

public String details()

details

public String details(boolean html)

saveToFile

public void saveToFile(File netConnFile)
                throws IOException
Throws:
IOException

getHtmlReport

public String getHtmlReport(int connType,
                            SimConfig simConfig)

getNetworkMLElement

public SimpleXMLEntity getNetworkMLElement(int unitSystem,
                                           boolean extraComments)
                                    throws NeuroMLException
Throws:
NeuroMLException

getNetworkMLElements

public ArrayList<SimpleXMLEntity> getNetworkMLElements(int unitSystem,
                                                       boolean extraComments,
                                                       NeuroMLConstants.NeuroMLVersion version)
                                                throws NeuroMLException
Throws:
NeuroMLException

getSynObjsPresent

public ArrayList<PostSynapticObject> getSynObjsPresent(String netConnName,
                                                       String synapseType,
                                                       int cellNumber,
                                                       int segmentId)
Gets all PostSynapticObjects for the specified synapse on the segment

Parameters:
netConnName - String The NetConn
synapseType - String Which of possible multiple synapse types to pick
cellNumber - number of cell in cell group
segmentId - int Segment id. If -1 then any segment on the cell
Returns:
ArrayList List of PostSynapticObjects
To do:
probably not the most efficient implementation of this...

loadFromFile

public void loadFromFile(File netConnFile)
                  throws IOException
Throws:
IOException

main

public static void main(String[] args)