@Test public void testEquals() { NTuple tuple1 = NTuple.newWithRandomWeights(3, new int[] { 9, 14, 13, 19 }, -1, +1, new RandomDataGenerator()); Assert.assertTrue(tuple1.equals(new NTuple(tuple1))); NTuple tuple2 = NTuple.newWithSharedWeights(tuple1, new int[] { 9, 14, 13, 19 }); Assert.assertTrue(tuple1.equals(new NTuple(tuple2))); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } NTuple other = (NTuple) obj; return new EqualsBuilder().append(locations, other.locations).append(LUT, other.LUT) .append(numValues, other.numValues).isEquals(); }
NTuple implements Serializable { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } NTuple other = (NTuple) obj; return new EqualsBuilder().append(locations, other.locations).append(LUT, other.LUT) .append(numValues, other.numValues).isEquals(); } }
NTuple implements Serializable { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } NTuple other = (NTuple) obj; return new EqualsBuilder().append(locations, other.locations).append(LUT, other.LUT) .append(numValues, other.numValues).isEquals(); } NTuple(int numValues, int[] locations, float[] weights);  NTuple(NTuple template); }
NTuple implements Serializable { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } NTuple other = (NTuple) obj; return new EqualsBuilder().append(locations, other.locations).append(LUT, other.LUT) .append(numValues, other.numValues).isEquals(); } NTuple(int numValues, int[] locations, float[] weights);  NTuple(NTuple template); static NTuple newWithSharedWeights(NTuple template, int[] locations); static NTuple newWithRandomWeights(int numValues, int[] locations, double minWeight, double maxWeight,
			RandomDataGenerator random); double getValue(Board board); int address(Board board); int[] valuesFromAddress(int address); float[] getWeights(); int getNumWeights(); int[] getLocations(); int getSize(); int getNumValues(); static int computeNumWeights(int numValues, int numFields); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); String toStringDetailed(); void increaseValue(Board board, float delta); void setValue(Board board, float value); }
NTuple implements Serializable { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } NTuple other = (NTuple) obj; return new EqualsBuilder().append(locations, other.locations).append(LUT, other.LUT) .append(numValues, other.numValues).isEquals(); } NTuple(int numValues, int[] locations, float[] weights);  NTuple(NTuple template); static NTuple newWithSharedWeights(NTuple template, int[] locations); static NTuple newWithRandomWeights(int numValues, int[] locations, double minWeight, double maxWeight,
			RandomDataGenerator random); double getValue(Board board); int address(Board board); int[] valuesFromAddress(int address); float[] getWeights(); int getNumWeights(); int[] getLocations(); int getSize(); int getNumValues(); static int computeNumWeights(int numValues, int numFields); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); String toStringDetailed(); void increaseValue(Board board, float delta); void setValue(Board board, float value);  }