@Override public NamedValue<? extends Number> getPerformance() { if( this.getAlgorithm() instanceof MeasurablePerformanceAlgorithm ) { return ((MeasurablePerformanceAlgorithm) this.getAlgorithm()).getPerformance(); } else { return null; } }
@Override public NamedValue<? extends Number> getPerformance() { if( this.getAlgorithm() instanceof MeasurablePerformanceAlgorithm ) { return ((MeasurablePerformanceAlgorithm) this.getAlgorithm()).getPerformance(); } else { return null; } }
@Override public NamedValue<? extends Number> getPerformance() { if( this.getAlgorithm() instanceof MeasurablePerformanceAlgorithm ) { return ((MeasurablePerformanceAlgorithm) this.getAlgorithm()).getPerformance(); } else { return null; } }
@Override public void stepEnded( final IterativeAlgorithm algorithm) { final int iteration = algorithm.getIteration(); final MeasurablePerformanceAlgorithm measurableAlgorithm = (MeasurablePerformanceAlgorithm) algorithm; // Be safe for handling null perfomance. final NamedValue<?> performance = measurableAlgorithm.getPerformance(); String name = performance == null ? "" : performance.getName(); if (name == null) { name = ""; } final Object value = performance == null ? null : performance.getValue(); this.out.println(String.format(format, iteration, name, value)); }
@Override public void stepEnded( final IterativeAlgorithm algorithm) { final int iteration = algorithm.getIteration(); final MeasurablePerformanceAlgorithm measurableAlgorithm = (MeasurablePerformanceAlgorithm) algorithm; // Be safe for handling null perfomance. final NamedValue<?> performance = measurableAlgorithm.getPerformance(); String name = performance == null ? "" : performance.getName(); if (name == null) { name = ""; } final Object value = performance == null ? null : performance.getValue(); this.out.println(String.format(format, iteration, name, value)); }
@Override public void stepEnded( final IterativeAlgorithm algorithm) { final int iteration = algorithm.getIteration(); final MeasurablePerformanceAlgorithm measurableAlgorithm = (MeasurablePerformanceAlgorithm) algorithm; // Be safe for handling null perfomance. final NamedValue<?> performance = measurableAlgorithm.getPerformance(); String name = performance == null ? "" : performance.getName(); if (name == null) { name = ""; } final Object value = performance == null ? null : performance.getValue(); this.out.println(String.format(format, iteration, name, value)); }