This repository has been archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added empty connection schema to enable prime spiking neuron pools.
- Loading branch information
Showing
9 changed files
with
216 additions
and
41 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
115 changes: 115 additions & 0 deletions
115
RCNet/Neural/Network/SM/Preprocessing/Reservoir/Pool/EmptySchemaSettings.cs
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,115 @@ | ||
using System; | ||
using System.Globalization; | ||
using System.Xml.Linq; | ||
|
||
namespace RCNet.Neural.Network.SM.Preprocessing.Reservoir.Pool | ||
{ | ||
/// <summary> | ||
/// Class contains configuration of the Empty schema of pool's neurons interconnection (ensures no internal pool connections) | ||
/// </summary> | ||
[Serializable] | ||
public class EmptySchemaSettings : RCNetBaseSettings, IInterconnSchemaSettings | ||
{ | ||
//Constants | ||
/// <summary> | ||
/// Name of the associated xsd type | ||
/// </summary> | ||
public const string XsdTypeName = "PoolInterconnectionEmptySchemaType"; | ||
|
||
//Constructors | ||
/// <summary> | ||
/// Creates an initialized instance | ||
/// </summary> | ||
public EmptySchemaSettings() | ||
{ | ||
Check(); | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// The deep copy constructor | ||
/// </summary> | ||
/// <param name="source">Source instance</param> | ||
public EmptySchemaSettings(EmptySchemaSettings source) | ||
: this() | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Creates an initialized instance. | ||
/// </summary> | ||
/// <param name="elem">Xml element containing the initialization settings</param> | ||
public EmptySchemaSettings(XElement elem) | ||
{ | ||
//Validation | ||
XElement settingsElem = Validate(elem, XsdTypeName); | ||
Check(); | ||
return; | ||
} | ||
|
||
//Properties | ||
/// <summary> | ||
/// Specifies whether the connections of this schema will replace existing connections | ||
/// </summary> | ||
public bool ReplaceExistingConnections { get { return false; } } | ||
|
||
/// <summary> | ||
/// Number of applications of this schema | ||
/// </summary> | ||
public int Repetitions { get { return 1; } } | ||
|
||
/// <summary> | ||
/// Identifies settings containing only default values | ||
/// </summary> | ||
public override bool ContainsOnlyDefaults | ||
{ | ||
get | ||
{ | ||
return true; | ||
} | ||
} | ||
|
||
//Methods | ||
/// <summary> | ||
/// Checks consistency | ||
/// </summary> | ||
protected override void Check() | ||
{ | ||
return; | ||
} | ||
|
||
/// <summary> | ||
/// Creates the deep copy instance of this instance | ||
/// </summary> | ||
public override RCNetBaseSettings DeepClone() | ||
{ | ||
return new EmptySchemaSettings(this); | ||
} | ||
|
||
/// <summary> | ||
/// Generates xml element containing the settings. | ||
/// </summary> | ||
/// <param name="rootElemName">Name to be used as a name of the root element.</param> | ||
/// <param name="suppressDefaults">Specifies whether to ommit optional nodes having set default values</param> | ||
/// <returns>XElement containing the settings</returns> | ||
public override XElement GetXml(string rootElemName, bool suppressDefaults) | ||
{ | ||
XElement rootElem = new XElement(rootElemName); | ||
Validate(rootElem, XsdTypeName); | ||
return rootElem; | ||
} | ||
|
||
/// <summary> | ||
/// Generates default named xml element containing the settings. | ||
/// </summary> | ||
/// <param name="suppressDefaults">Specifies whether to ommit optional nodes having set default values</param> | ||
/// <returns>XElement containing the settings</returns> | ||
public override XElement GetXml(bool suppressDefaults) | ||
{ | ||
return GetXml("emptySchema", suppressDefaults); | ||
} | ||
|
||
}//EmptySchemaSettings | ||
|
||
}//Namespace |
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
Oops, something went wrong.