## Examples of divide()

### Examples of org.apache.mahout.matrix.DenseVector.divide()

 `298299300301302303304305306307308` ```   */   public Vector computeBoundCentroid() {     Vector result = new DenseVector(center.cardinality());     for (Vector v : boundPoints)       result.assign(v, new PlusFunction());     return result.divide(boundPoints.size());   }   /**    * Compute the centroid by normalizing the pointTotal    *   ```
View Full Code Here

### Examples of org.apache.mahout.matrix.Vector.divide()

 `298299300301302303304305306307308` ```   */   public Vector computeBoundCentroid() {     Vector result = new DenseVector(center.cardinality());     for (Vector v : boundPoints)       result.assign(v, new PlusFunction());     return result.divide(boundPoints.size());   }   /**    * Compute the centroid by normalizing the pointTotal    *   ```
View Full Code Here

### Examples of org.apache.sis.internal.util.DoubleDouble.divide()

 `158159160161162163164165166167168` ```    final DoubleDouble period(final Date time) {         if (time != null) {             final long millis = time.getTime() - timeReference;             if (millis != 0) { // Returns null for 0 as an optimization.                 final DoubleDouble period = new DoubleDouble(millis, 0);                 period.divide(1000 * JULIAN_YEAR_LENGTH, 0);                 return period;             }         }         return null;     } ```
View Full Code Here

### Examples of org.cmj.flowy.simulation.math.Vector2.divide()

 `65666768697071727374` ```    positionOld.y = origPosY;         // calculate velocity     // Velocity = (Position - PositionOld) / dt;     temp = Vector2.Subtract(position, positionOld);     temp.divide(timeStep);     velocity.setFromVector(temp);   } } ```
View Full Code Here

### Examples of org.drools.planner.benchmark.core.measurement.ScoreDifferencePercentage.divide()

 `166167168169170171172173174175176` ```                }             }         }         if (!firstNonFailure) {             int successCount = getSuccessCount();             averageWorstScoreDifferencePercentage = totalWorstScoreDifferencePercentage.divide((double) successCount);             averageAverageCalculateCountPerSecond = totalAverageCalculateCountPerSecond / (long) successCount;         }     }     public int getSuccessCount() { ```
View Full Code Here

### Examples of org.earth3d.jearth.math.Point3D.divide()

 `456457458459460461462463464465466` ```      TextureTreeNodeCore texcore = (TextureTreeNodeCore) getCore(0);       Point3D center = new Point3D();       for(int i=0; i<4; i++) {         center.add(texcore.getVertex(i));       }       center = center.divide(4);       double radius=0, newradius;       for(int i=0; i<4; i++) {         newradius = texcore.getVertex(i).sub(center).length();         if (newradius>radius) radius = newradius; ```
View Full Code Here

### Examples of org.ejml.simple.SimpleMatrix.divide()

 `5859606162636465666768` ```            SimpleMatrix v = QR.extractMatrix(i, END,i,i+1);             double max = v.elementMaxAbs();             if( max > 0 && v.getNumElements() > 1 ) {                 // normalize to reduce overflow issues                 v = v.divide(max);                 // compute the magnitude of the vector                 double tau = v.normF();                 if( v.get(0) < 0 ) ```
View Full Code Here

### Examples of org.h2.value.ValueTime.divide()

 `135136137138139140141142143144145` ```        assertEquals(1, t1.getSignum());         assertEquals(-1, t1.negate().getSignum());         assertEquals(0, t1.multiply(ValueInt.get(0)).getSignum());         assertEquals(0, t1.subtract(t1).getSignum());         assertEquals("05:35:35.5", t1.multiply(ValueDouble.get(0.5)).getString());         assertEquals("22:22:22", t1.divide(ValueDouble.get(0.5)).getString());         assertEquals("-11:11:11", t1.negate().getString());         assertEquals("11:11:11", t1.negate().negate().getString());         assertEquals(Value.TIME, t1.getType());         long nanos = t1.getNanos();         assertEquals((int) ((nanos >>> 32) ^ nanos), t1.hashCode()); ```
View Full Code Here

### Examples of org.hsqldb.types.Type.divide()

 `901902903904905906907908909910911` ```                    temp   = opType.convertToType(session, temp, subType);                     temp2  = opType.convertToType(session, temp2, subType);                 }                 temp = opType.multiply(temp, data);                 temp = opType.divide(session, temp, temp2);                 temp = dataType.convertToDefaultType(session, temp);                 return dataType.add(session, temp, ValuePool.INTEGER_1,                                     Type.SQL_INTEGER);             } ```
View Full Code Here

### Examples of org.jamesii.core.math.complex.ComplexArray1D.divide()

 `768769770771772773774775776777778` ```  public void testDivideExceptions() {     ComplexArray1D a = new ComplexArray1D(new Complex[] { new Complex(1, 1) });     // testing divide(int, double, double, double, double)     try {       a.divide(-1, 2d, 3d, 1d, 2d);       fail();     } catch (IndexOutOfBoundsException e) {       assertTrue(true);     } catch (Exception e) {       fail(); ```
View Full Code Here