static { ARGS = TestUtils.createData( // null, // new AbstractXIdObject(XId.newId()) {}, // new AbstractXIdObject(XId.newId(1, 2)) {}); }
static { List<Boolean> addFlags = new ArrayList<Boolean>(); for (int i = 0; i < Fragment.values().length; i++) { addFlags.add(RandomUtil.nextBoolean()); } List<List<Boolean>> testFlags = new ArrayList<List<Boolean>>(); for (int i = 0; i < Fragment.values().length; i++) { Collections.rotate(addFlags, 1); testFlags.add(new ArrayList<Boolean>(addFlags)); } FLAGS = TestUtils.createData(testFlags.toArray()); List<Range<?>> ranges = new ArrayList<Range<?>>(); for (Fragment fragment : Fragment.values()) { switch (fragment) { case DOES_INVERT: ranges.add(Range.getInstance(false, true)); ranges.add(Range.getInstance(false, true)); break; case DELAY: case OSCILLATION_OFFSET: case OSCILLATION_PERIOD: ranges.add(Range.getInstance(RandomUtil.nextInteger())); ranges.add(Range.getInstance(RandomUtil.nextInteger())); break; default: ranges.add(Range.getInstance(RandomUtil.nextFloat())); ranges.add(Range.getInstance(RandomUtil.nextFloat())); break; } } RANGES = ranges.toArray(new Range<?>[0]); TEMPLATE = NodeConfiguration // .builder() // .setDelay(Range.getInstance(0), null) // .setInvertFlag(Range.<Boolean>openRange(), null) // .setEnergy(Range.<Float>openRange(), null) // .setEnergyDecay(Range.<Float>openRange(), null) // .setExcitatoryScale(Range.<Float>openRange(), null) // .setInhibitoryScale(Range.<Float>openRange(), null) // .setOscillationMaximum(Range.<Float>openRange(), null) // .setOscillationMinimum(Range.<Float>openRange(), null) // .setOscillationOffset(Range.<Integer>openRange(), null) // .setOscillationPeriod(Range.<Integer>openRange(), null) // .setScale(Range.<Float>openRange(), null) // .setShift(Range.<Float>openRange(), null) // .setTwitchMaximum(Range.<Float>openRange(), null) // .setTwitchMinimum(Range.<Float>openRange(), null) // .setTwitchProbability(Range.<Float>openRange(), null) // .newInstance(); }
static { List<Boolean> addFlags = new ArrayList<Boolean>(); for (int i = 0; i < Fragment.values().length; i++) { addFlags.add(RandomUtil.nextBoolean()); } List<List<Boolean>> testFlags = new ArrayList<List<Boolean>>(); for (int i = 0; i < Fragment.values().length; i++) { Collections.rotate(addFlags, 1); testFlags.add(new ArrayList<Boolean>(addFlags)); } FLAGS = TestUtils.createData(testFlags.toArray()); List<Range<?>> ranges = new ArrayList<Range<?>>(); for (Fragment fragment : Fragment.values()) { switch (fragment) { case IS_INHIBITORY: ranges.add(Range.getInstance(false, true)); ranges.add(Range.getInstance(false, true)); break; default: ranges.add(Range.getInstance(RandomUtils.nextFloat())); ranges.add(Range.getInstance(RandomUtils.nextFloat())); break; } } RANGES = ranges.toArray(new Range<?>[0]); TEMPLATE = LinkConfiguration // .builder() // .setCapacity(Range.<Float>openRange(), null) // .setCapacityAttack(Range.<Float>openRange(), null) // .setCapacityDecay(Range.<Float>openRange(), null) // .setStrength(Range.<Float>openRange(), null) // .setStrengthAttack(Range.<Float>openRange(), null) // .setStrengthDecay(Range.<Float>openRange(), null) // .setInhibitoryFlag(Range.<Boolean>openRange(), null) // .newInstance(); }