Package weka.core

Examples of weka.core.FastVector.elementAt()


    if (((Double)stmp.elementAt(0)).intValue() == 1) {
      //then rectangle
      x1 = ((Double)stmp.elementAt(1)).doubleValue();
      y1 = ((Double)stmp.elementAt(2)).doubleValue();
      x2 = ((Double)stmp.elementAt(3)).doubleValue();
      y2 = ((Double)stmp.elementAt(4)).doubleValue();
      if (i.value(m_xIndex) >= x1 && i.value(m_xIndex) <= x2 &&
    i.value(m_yIndex) <= y1 && i.value(m_yIndex) >= y2) {
        //then is inside split so return true;
        return true;
      }
View Full Code Here


    i.value(m_yIndex) <= y1 && i.value(m_yIndex) >= y2) {
        //then is inside split so return true;
        return true;
      }
    }
    else if (((Double)stmp.elementAt(0)).intValue() == 2) {
      //then polygon
      if (inPoly(stmp, i.value(m_xIndex), i.value(m_yIndex))) {
        return true;
      }
    }
View Full Code Here

      //then polygon
      if (inPoly(stmp, i.value(m_xIndex), i.value(m_yIndex))) {
        return true;
      }
    }
    else if (((Double)stmp.elementAt(0)).intValue() == 3) {
      //then polyline
      if (inPolyline(stmp, i.value(m_xIndex), i.value(m_yIndex))) {
        return true;
      }
    }
View Full Code Here

      if (m_shapes != null) {
  FastVector stmp;
  int x1, y1, x2, y2;
  for (int noa = 0; noa < m_shapes.size(); noa++) {
    stmp = (FastVector)m_shapes.elementAt(noa);
    if (((Double)stmp.elementAt(0)).intValue() == 1) {
      //then rectangle
      x1 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(1)).
              doubleValue());
      y1 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(2)).
              doubleValue());
View Full Code Here

  int x1, y1, x2, y2;
  for (int noa = 0; noa < m_shapes.size(); noa++) {
    stmp = (FastVector)m_shapes.elementAt(noa);
    if (((Double)stmp.elementAt(0)).intValue() == 1) {
      //then rectangle
      x1 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(1)).
              doubleValue());
      y1 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(2)).
              doubleValue());
      x2 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(3)).
              doubleValue());
View Full Code Here

    stmp = (FastVector)m_shapes.elementAt(noa);
    if (((Double)stmp.elementAt(0)).intValue() == 1) {
      //then rectangle
      x1 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(1)).
              doubleValue());
      y1 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(2)).
              doubleValue());
      x2 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(3)).
              doubleValue());
      y2 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(4)).
              doubleValue());
View Full Code Here

      //then rectangle
      x1 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(1)).
              doubleValue());
      y1 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(2)).
              doubleValue());
      x2 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(3)).
              doubleValue());
      y2 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(4)).
              doubleValue());
     
      gx.setColor(Color.gray);
View Full Code Here

              doubleValue());
      y1 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(2)).
              doubleValue());
      x2 = (int)m_plot2D.convertToPanelX(((Double)stmp.elementAt(3)).
              doubleValue());
      y2 = (int)m_plot2D.convertToPanelY(((Double)stmp.elementAt(4)).
              doubleValue());
     
      gx.setColor(Color.gray);
      gx.fillRect(x1, y1, x2 - x1, y2 - y1);
      gx.setColor(Color.black);
View Full Code Here

      gx.fillRect(x1, y1, x2 - x1, y2 - y1);
      gx.setColor(Color.black);
      gx.drawRect(x1, y1, x2 - x1, y2 - y1);
     
    }
    else if (((Double)stmp.elementAt(0)).intValue() == 2) {
      //then polygon
      int[] ar1, ar2;
      ar1 = getXCoords(stmp);
      ar2 = getYCoords(stmp);
      gx.setColor(Color.gray);
View Full Code Here

      gx.setColor(Color.gray);
      gx.fillPolygon(ar1, ar2, (stmp.size() - 1) / 2);
      gx.setColor(Color.black);
      gx.drawPolyline(ar1, ar2, (stmp.size() - 1) / 2);
    }
    else if (((Double)stmp.elementAt(0)).intValue() == 3) {
      //then polyline
      int[] ar1, ar2;
      FastVector tmp = makePolygon(stmp);
      ar1 = getXCoords(tmp);
      ar2 = getYCoords(tmp);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.