public AlgVector(Instance instance) throws Exception {  int len = instance.numAttributes(); for (int i = 0; i < instance.numAttributes(); i++) { if (!instance.attribute(i).isNumeric()) len--; } if (len > 0) { m_Elements = new double[len]; for (int i = 0; i < len; i++) { m_Elements[i] = instance.valueSparse(i); } }
public AlgVector(int n) {  m_Elements = new double[n]; initialize();
  public AlgVector(Instance instance) throws Exception {        int len = instance.numAttributes();    for (int i = 0; i < instance.numAttributes(); i++) {      if (!instance.attribute(i).isNumeric()) len--;    }    if (len > 0) {      m_Elements = new double[len];      for (int i = 0; i < len; i++) {	m_Elements[i] = instance.valueSparse(i); //possibly a bug      }    }  }