/** * Initialize ranges, upper limit must be set * * @param upper upper limit */ public void initializeRanges(int upper) { m_outputTypes.setUpper(upper); }
/** * Initialize ranges, upper limit must be set * * @param upper upper limit */ public void initializeRanges(int upper) { m_outputTypes.setUpper(upper); }
/** * Switches the outputs on that are requested from the option O * * @param list list of integers, all are used for an output type */ public void setOutputTypes(String list) { if (list.length() > 0) { m_verboseOn = true; m_outputTypes.setRanges(list); m_outputTypes.setUpper(30); } }
/** * Switches the outputs on that are requested from the option O * * @param list list of integers, all are used for an output type */ public void setOutputTypes(String list) { if (list.length() > 0) { m_verboseOn = true; m_outputTypes.setRanges(list); m_outputTypes.setUpper(30); } }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately. * @throws UnsupportedAttributeTypeException if the selected attribute a * string attribute. * @throws Exception if the input format can't be set successfully. */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); m_AttIndices.setUpper(instanceInfo.numAttributes() - 1); return false; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately. * @throws UnsupportedAttributeTypeException if the selected attribute a * string attribute. * @throws Exception if the input format can't be set successfully. */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); m_AttIndices.setUpper(instanceInfo.numAttributes() - 1); return false; }
/** * Determines the output format based on the input format and returns this. In * case the output format cannot be returned immediately, i.e., * immediateOutputFormat() returns false, then this method will be called from * batchFinished(). * * @param inputFormat the input format to base the output format on * @return the output format * @throws Exception in case the determination goes wrong * @see #hasImmediateOutputFormat() * @see #batchFinished() */ @Override protected Instances determineOutputFormat(Instances inputFormat) throws Exception { m_Cols.setUpper(inputFormat.numAttributes() - 1); return new Instances(inputFormat); }
/** * initializes the attribute indices. */ protected void initializeAttributeIndices() { m_AttributeIndices.setUpper(m_Data.numAttributes() - 1); m_ActiveIndices = new boolean[m_Data.numAttributes()]; for (int i = 0; i < m_ActiveIndices.length; i++) { m_ActiveIndices[i] = m_AttributeIndices.isInRange(i); } }
/** * sets the parent datagenerator this cluster belongs to * * @param parent the parent datagenerator */ public void setParent(SubspaceCluster parent) { super.setParent(parent); m_AttrIndexRange.setUpper(getParent().getNumAttributes()); }
/** * sets the parent datagenerator this cluster belongs to * * @param parent the parent datagenerator */ public void setParent(SubspaceCluster parent) { super.setParent(parent); m_AttrIndexRange.setUpper(getParent().getNumAttributes()); }
/** * initializes the attribute indices. */ protected void initializeAttributeIndices() { m_AttributeIndices.setUpper(m_Data.numAttributes() - 1); m_ActiveIndices = new boolean[m_Data.numAttributes()]; for (int i = 0; i < m_ActiveIndices.length; i++) { m_ActiveIndices[i] = m_AttributeIndices.isInRange(i); } }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - only the * structure is required). * @return true if the outputFormat may be collected immediately */ public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); setOutputFormat(instanceInfo); m_SelectCols.setUpper(instanceInfo.numAttributes() - 1); return true; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if the input format can't be set successfully */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); m_Columns.setUpper(instanceInfo.numAttributes() - 1); setOutputFormat(); return true; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if the format couldn't be set successfully */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); resetHistory(); m_SelectedCols.setUpper(instanceInfo.numAttributes() - 1); return false; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if the input format can't be set successfully */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); m_Columns.setUpper(instanceInfo.numAttributes() - 1); setOutputFormat(); return true; }
/** * Sets the format of the input instances. * * @param instanceInfo an Instances object containing the input instance * structure (any instances contained in the object are ignored - * only the structure is required). * @return true if the outputFormat may be collected immediately * @throws Exception if the format couldn't be set successfully */ @Override public boolean setInputFormat(Instances instanceInfo) throws Exception { super.setInputFormat(instanceInfo); resetHistory(); m_SelectedCols.setUpper(instanceInfo.numAttributes() - 1); return false; }
/** * test the default constructor */ public void testDefaultConstructor() throws Exception { int upper = 10; int indexInt = 0; String indexStr = "" + (indexInt + 1); Range index = new Range(); index.setRanges(indexStr); index.setUpper(upper); assertEquals(indexStr, index.getRanges()); assertEquals(1, index.getSelection().length); assertEquals(indexInt, index.getSelection()[0]); }
/** * test the default constructor */ public void testDefaultConstructor() throws Exception { int upper = 10; int indexInt = 0; String indexStr = "" + (indexInt + 1); Range index = new Range(); index.setRanges(indexStr); index.setUpper(upper); assertEquals(indexStr, index.getRanges()); assertEquals(1, index.getSelection().length); assertEquals(indexInt, index.getSelection()[0]); }