public abstract class PositionRelation extends Relation
| Modifier and Type | Class and Description |
|---|---|
static class |
PositionRelation.Equals |
static class |
PositionRelation.GreaterThan |
static class |
PositionRelation.LessThan |
Relation.Builder, Relation.None, Relation.RelationFactory| Modifier and Type | Field and Description |
|---|---|
int |
fromSlot |
int |
toSlot |
AFTER, BEFORE, BEGIN_EQUALS, BEGIN_TO_END_EQUALS, CONTAINED_IN, CONTAINS, END_EQUALS, END_TO_BEGIN_EQUALS, EQUALS, NONE, OVERLAPS, relationRegistry| Constructor and Description |
|---|
PositionRelation() |
PositionRelation(int fromSlot,
int toSlot) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Relation rel) |
abstract Stream<Activation> |
getActivations(INeuron.ThreadState th,
Position pos) |
Stream<Activation> |
getActivations(INeuron n,
Activation linkedAct) |
void |
linksOutputs(Set<Integer> results) |
void |
mapRange(Map<Integer,Position> slots,
Activation act) |
void |
readFields(DataInput in,
Model m)
Deserialize the fields of this object from
in. |
void |
registerRequiredSlots(Neuron input) |
boolean |
test(Activation act,
Activation linkedAct) |
abstract boolean |
test(Position a,
Position b) |
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
addRelation, follow, getRelationsMap, getType, invert, isExact, read, registerRelationpublic PositionRelation()
public PositionRelation(int fromSlot,
int toSlot)
public boolean test(Activation act, Activation linkedAct)
public void mapRange(Map<Integer,Position> slots, Activation act)
public void linksOutputs(Set<Integer> results)
linksOutputs in class Relationpublic int compareTo(Relation rel)
compareTo in interface Comparable<Relation>compareTo in class Relationpublic void write(DataOutput out) throws IOException
Writableout.write in interface Writablewrite in class Relationout - DataOuput to serialize this object into.IOExceptionpublic void readFields(DataInput in, Model m) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface WritablereadFields in class Relationin - DataInput to deseriablize this object from.IOExceptionpublic Stream<Activation> getActivations(INeuron n, Activation linkedAct)
getActivations in class Relationpublic abstract Stream<Activation> getActivations(INeuron.ThreadState th, Position pos)
public void registerRequiredSlots(Neuron input)
registerRequiredSlots in class RelationCopyright © 2018. All rights reserved.