/** {@inheritDoc} */ @Override public Object read(final InputStream is) { final ART1 result = new ART1(); final EncogReadHelper in = new EncogReadHelper(is); EncogFileSection section; while ((section = in.readNextSection()) != null) { if (section.getSectionName().equals("ART1") && section.getSubSectionName().equals("PARAMS")) { final Map<String, String> params = section.parseParams(); result.getProperties().putAll(params); } if (section.getSectionName().equals("ART1") && section.getSubSectionName().equals("NETWORK")) { final Map<String, String> params = section.parseParams(); result.setA1(EncogFileSection.parseDouble(params, ART.PROPERTY_A1)); result.setB1(EncogFileSection.parseDouble(params, ART.PROPERTY_B1)); result.setC1(EncogFileSection.parseDouble(params, ART.PROPERTY_C1)); result.setD1(EncogFileSection.parseDouble(params, ART.PROPERTY_D1)); result.setF1Count(EncogFileSection.parseInt(params, PersistConst.PROPERTY_F1_COUNT)); result.setF2Count(EncogFileSection.parseInt(params, PersistConst.PROPERTY_F2_COUNT)); result.setNoWinner(EncogFileSection.parseInt(params, ART.PROPERTY_NO_WINNER)); result.setL(EncogFileSection.parseDouble(params, ART.PROPERTY_L)); result.setVigilance(EncogFileSection.parseDouble(params, ART.PROPERTY_VIGILANCE)); result.setWeightsF1toF2( EncogFileSection.parseMatrix(params, PersistConst.PROPERTY_WEIGHTS_F1_F2)); result.setWeightsF2toF1( EncogFileSection.parseMatrix(params, PersistConst.PROPERTY_WEIGHTS_F2_F1)); } } return result; }