Subtract one shape from another - note this is experimental and doesn't
currently handle islands

@param target The target to be subtracted from
@param missing The shape to subtract
@return The newly created shapes
484703
public Shape[] subtract(Shape target, Shape missing) {	
		target = target.transform(new Transform());
		missing = missing.transform(new Transform());

		int count = 0;
		for (int i=0;i<target.getPointCount();i++) {
			if (missing.contains(target.getPoint(i)[0], target.getPoint(i)[1])) {
				count++;
			}
		}
		
		if (count == target.getPointCount()) {
			return new Shape[0];
		}
		
		if (!target.intersects(missing)) {
			return new Shape[] {target};
		}
		
		int found = 0;
		for (int i=0;i<missing.getPointCount();i++) {
			if (target.contains(missing.getPoint(i)[0], missing.getPoint(i)[1])) {
				if (!onPath(target, missing.getPoint(i)[0], missing.getPoint(i)[1])) {
					found++;
				}
			}
		}
		for (int i=0;i<target.getPointCount();i++) {
			if (missing.contains(target.getPoint(i)[0], target.getPoint(i)[1])) {
				if (!onPath(missing, target.getPoint(i)[0], target.getPoint(i)[1])) 
				{
					found++;
				}
			}
		}
		
		if (found < 1) {
			return new Shape[] {target};
		}
		
		return combine(target, missing, true);
	}
127831
public static void subtract(double val , DMatrixD1 a , DMatrixD1 c ) {
        c.reshape(a.numRows,a.numCols);

        final int length = a.getNumElements();

        for( int i = 0; i < length; i++ ) {
            c.data[i] = val - a.data[i];
        }
    }
796571
public void subtractAll(IntCounter<E> counter) {
    for (E key : map.keySet()) {
      decrementCount(key, counter.getIntCount(key));
    }
  }
136986
public LookupCacheStats minus(LookupCacheStats other)
  {
    return new LookupCacheStats(
        Math.max(0, hitCount - other.hitCount),
        Math.max(0, missCount - other.missCount),
        Math.max(0, evictionCount - other.evictionCount)
    );
  }
874070
public static long sub2Ind(int[] shape, int[] indices) {
        long index = 0;
        int shift = 1;
        for (int i = 0; i < shape.length; i++) {
            index += shift * indices[i];
            shift *= shape[i];
        }
        return index;
    }
311563
public static <T> Level0IndefiniteArrayOperator<T[],T> onArray(final T[] target) {
        return new Level0IndefiniteArrayOperator<T[],T>(ExecutionTarget.forOp(target, Normalisation.NONE));
    }
1262519
public boolean subtractAll(ModuleDeps toSub) {
		boolean modified = false;
		for (Map.Entry<String, ModuleDepInfo> entry : toSub.entrySet()) {
			modified |= subtract(entry.getKey(), entry.getValue());
		}
		return modified;
	}
1042229
public List<String> listUnescapeJavaScript(final List<?> target) {
        if (target == null) {
            return null;
        }
        final List<String> result = new ArrayList<String>(target.size() + 2);
        for (final Object element : target) {
            result.add(unescapeJavaScript(element));
        }
        return result;
    }
654452
public Shape[] union(Shape target, Shape other) {
		target = target.transform(new Transform());
		other = other.transform(new Transform());
		
		if (!target.intersects(other)) {
			return new Shape[] {target, other};
		}
		
		// handle the case where intersects is true but really we're talking
		// about edge points
		boolean touches = false;
		int buttCount = 0;
		for (int i=0;i<target.getPointCount();i++) {
			if (other.contains(target.getPoint(i)[0], target.getPoint(i)[1])) {
				if (!other.hasVertex(target.getPoint(i)[0], target.getPoint(i)[1])) {
					touches = true;
					break;
				}
			}
			if (other.hasVertex(target.getPoint(i)[0], target.getPoint(i)[1])) {
				buttCount++;
			} 
		}
		for (int i=0;i<other.getPointCount();i++) {
			if (target.contains(other.getPoint(i)[0], other.getPoint(i)[1])) {
				if (!target.hasVertex(other.getPoint(i)[0], other.getPoint(i)[1])) {
					touches = true;
					break;
				}
			}
		}
		
		if ((!touches) && (buttCount < 2)) {
			return new Shape[] {target, other};
		}
		
		// so they are definitely touching, consider the union
		return combine(target, other, false);
	}
660855
public static INDArray min(INDArray x, INDArray y, INDArray z, int... dimensions) {
        if(dimensions == null || dimensions.length == 0) {
            validateShapesNoDimCase(x,y,z);
            return Nd4j.getExecutioner().exec(new OldMin(x,y,z));
        }


        return Nd4j.getExecutioner().exec(new BroadcastMin(x,y,z,dimensions));
    }
798797
public Collection getMergedExcludes( Class target ) {
      if( target == null ) {
         return getMergedExcludes();
      }

      Collection exclusionSet = getMergedExcludes();
      if( !exclusionMap.isEmpty() ) {
         Object key = propertyExclusionClassMatcher.getMatch( target, exclusionMap.keySet() );
         Set set = (Set) exclusionMap.get( key );
         if( set != null && !set.isEmpty() ) {
            for( Iterator i = set.iterator(); i.hasNext(); ) {
               Object e = i.next();
               if( !exclusionSet.contains( e ) ) {
                  exclusionSet.add( e );
               }
            }
         }
      }

      return exclusionSet;
   }
286507
public static double[] subtractArray(double[] array1, double[] array2)
    {
        if (array1.length != array2.length)
        {
            throw new IllegalArgumentException("The dimensions have to be equal!");
        }

        double[] result = new double[array1.length];
        assert array1.length == array2.length;
        for (int i = 0; i < array1.length; i++)
        {
            result[i] = array1[i] - array2[i];
        }

        return result;
    }
1241069
public Matrix subtract(Matrix B, ExecutorService threadPool)
    {
        Matrix toReturn = getThisSideMatrix(B);
        toReturn.mutableSubtract(1.0, B, threadPool);
        return toReturn;
    }
1291812
private ClickableMarkerShape translateMarker(ClickableMarkerShape shape, int amountOfMarkers) {
		if (amountOfMarkers % imagePerRow != 0) {
			int size = choiceListImageSize + 6;
			shape.setTranslation(size * (amountOfMarkers % imagePerRow), size * (amountOfMarkers / imagePerRow));
		}
		return shape;
	}
470691
public Matrix subtract(double c)
    {
        Matrix toReturn = getThisSideMatrix(null);
        toReturn.mutableSubtract(c);
        return toReturn;
    }
622415
int subtract(MutableBigInteger b) {
        MutableBigInteger a = this;

        int[] result = value;
        int sign = a.compare(b);

        if (sign == 0) {
            reset();
            return 0;
        }
        if (sign < 0) {
            MutableBigInteger tmp = a;
            a = b;
            b = tmp;
        }

        int resultLen = a.intLen;
        if (result.length < resultLen)
            result = new int[resultLen];

        long diff = 0;
        int x = a.intLen;
        int y = b.intLen;
        int rstart = result.length - 1;

        // Subtract common parts of both numbers
        while (y > 0) {
            x--; y--;

            diff = (a.value[x+a.offset] & LONG_MASK) -
                   (b.value[y+b.offset] & LONG_MASK) - ((int)-(diff>>32));
            result[rstart--] = (int)diff;
        }
        // Subtract remainder of longer number
        while (x > 0) {
            x--;
            diff = (a.value[x+a.offset] & LONG_MASK) - ((int)-(diff>>32));
            result[rstart--] = (int)diff;
        }

        value = result;
        intLen = resultLen;
        offset = value.length - resultLen;
        normalize();
        return sign;
    }
1179665
public static void subtractEquals( DMatrix4 a , DMatrix4 b ) {
        a.a1 -= b.a1;
        a.a2 -= b.a2;
        a.a3 -= b.a3;
        a.a4 -= b.a4;
    }