Author: tommaso
Date: Wed May 23 21:22:16 2012
New Revision: 1342054
URL: http://svn.apache.org/viewvc?rev=1342054&view=rev
Log:
moved the bio package in a separate module
Added:
labs/yay/trunk/bio/
labs/yay/trunk/bio/pom.xml
labs/yay/trunk/bio/src/
labs/yay/trunk/bio/src/main/
labs/yay/trunk/bio/src/main/java/
labs/yay/trunk/bio/src/main/java/org/
labs/yay/trunk/bio/src/main/java/org/apache/
labs/yay/trunk/bio/src/main/java/org/apache/yay/
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Axon.java
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/AxonTerminal.java
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Dendrite.java
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Neuron.java
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Nucleus.java
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Signal.java
labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Synapse.java
Added: labs/yay/trunk/bio/pom.xml
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/pom.xml?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/pom.xml (added)
+++ labs/yay/trunk/bio/pom.xml Wed May 23 21:22:16 2012
@@ -0,0 +1,14 @@
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>bio</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <parent>
+ <groupId>org.apache.yay</groupId>
+ <artifactId>parent</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+ <name>Yay bio</name>
+</project>
\ No newline at end of file
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Axon.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Axon.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Axon.java (added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Axon.java Wed May 23
21:22:16 2012
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+import java.util.Collection;
+
+/**
+ * An axon is the item responsible of delivering signals elaborated from the
nucleus to dendrites of other neurons
+ * connected through a synapse via its terminals
+ */
+public class Axon {
+ private Collection<AxonTerminal> terminals;
+
+ public Axon(Collection<AxonTerminal> terminals) {
+ this.terminals = terminals;
+ }
+
+ public Collection<AxonTerminal> getTerminals() {
+ return terminals;
+ }
+}
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/AxonTerminal.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/AxonTerminal.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/AxonTerminal.java
(added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/AxonTerminal.java Wed
May 23 21:22:16 2012
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+/**
+ * An output unit of a neuron connected to the nucleus via the axon
+ */
+public interface AxonTerminal {
+
+ public Signal read();
+
+}
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Dendrite.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Dendrite.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Dendrite.java (added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Dendrite.java Wed May
23 21:22:16 2012
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+/**
+ * A dendrite is the item responsible of collecting and delivering signals
sent to a certain neuron
+ */
+public abstract class Dendrite {
+
+ private Long weight;
+
+ public abstract void accept(Signal signal);
+
+ public Long getWeight() {
+ return weight;
+ }
+}
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Neuron.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Neuron.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Neuron.java (added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Neuron.java Wed May 23
21:22:16 2012
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+
+import java.util.Collection;
+
+/**
+ * A neuron is the fundamental unit of a neural network and responsible of the
signal elaboration
+ */
+public class Neuron {
+
+ private Nucleus nucleus;
+ private Collection<Dendrite> dendrites;
+ private Axon axon;
+
+ public Neuron(Nucleus nucleus, Collection<Dendrite> dendrites, Axon axon) {
+ this.nucleus = nucleus;
+ this.dendrites = dendrites;
+ this.axon = axon;
+ }
+
+ public Collection<Dendrite> getDendrites() {
+ return dendrites;
+ }
+
+ public Axon getAxon() {
+ return axon;
+ }
+}
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Nucleus.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Nucleus.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Nucleus.java (added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Nucleus.java Wed May 23
21:22:16 2012
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+/**
+ * the elaboration item in the neuron
+ */
+public interface Nucleus {
+
+ public Signal elaborate(Signal signal);
+
+}
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Signal.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Signal.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Signal.java (added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Signal.java Wed May 23
21:22:16 2012
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+/**
+ * A signal represents and wraps the information, of type T, traversing
neurons of a neural network
+ */
+public interface Signal<T> {
+ public T getValue();
+}
Added: labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Synapse.java
URL:
http://svn.apache.org/viewvc/labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Synapse.java?rev=1342054&view=auto
==============================================================================
--- labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Synapse.java (added)
+++ labs/yay/trunk/bio/src/main/java/org/apache/yay/bio/Synapse.java Wed May 23
21:22:16 2012
@@ -0,0 +1,28 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.yay.bio;
+
+/**
+ * A synapse connects neurons from axons to dendrites
+ */
+public interface Synapse {
+
+ public Synapse connect(Neuron from, Neuron to);
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]