@Override public void dotTimesEquals( final InfiniteVector<KeyType> other) { for (Map.Entry<KeyType, MutableDouble> entry : this.map.entrySet()) { final KeyType key = entry.getKey(); final MutableDouble value = entry.getValue(); final double thisValue = value.value; final double otherValue = other.get(key); value.value = thisValue * otherValue; } }
@Override public void dotTimesEquals( final InfiniteVector<KeyType> other) { for (Map.Entry<KeyType, MutableDouble> entry : this.map.entrySet()) { final KeyType key = entry.getKey(); final MutableDouble value = entry.getValue(); final double thisValue = value.value; final double otherValue = other.get(key); value.value = thisValue * otherValue; } }
@Override public void dotTimesEquals( final InfiniteVector<KeyType> other) { for (Map.Entry<KeyType, MutableDouble> entry : this.map.entrySet()) { final KeyType key = entry.getKey(); final MutableDouble value = entry.getValue(); final double thisValue = value.value; final double otherValue = other.get(key); value.value = thisValue * otherValue; } }
@Override public double dotProduct( final InfiniteVector<KeyType> other) { double result = 0.0; for (Map.Entry<KeyType, MutableDouble> entry : this.map.entrySet()) { final KeyType key = entry.getKey(); final double thisValue = entry.getValue().value; final double otherValue = other.get(key); result += thisValue * otherValue; } return result; }
@Override public double dotProduct( final InfiniteVector<KeyType> other) { double result = 0.0; for (Map.Entry<KeyType, MutableDouble> entry : this.map.entrySet()) { final KeyType key = entry.getKey(); final double thisValue = entry.getValue().value; final double otherValue = other.get(key); result += thisValue * otherValue; } return result; }
@Override public double dotProduct( final InfiniteVector<KeyType> other) { double result = 0.0; for (Map.Entry<KeyType, MutableDouble> entry : this.map.entrySet()) { final KeyType key = entry.getKey(); final double thisValue = entry.getValue().value; final double otherValue = other.get(key); result += thisValue * otherValue; } return result; }