private void updateTemporalSemantics(long currentSemanticPartitionStartTime,
                                         SemanticSpace semanticPartition) {
        
        // Pre-allocate the zero vector so that if multiple interesting words
        // are not present in the space, they all point to the same zero
        // semantics
        double[] zeroVector = new double[semanticPartition.getVectorLength()];

        for (String word : interestingWords) {
            // update the vectors
            SortedMap<Long,double[]> temporalSemantics = 
                wordToTemporalSemantics.get(word);
            Vector v = semanticPartition.getVector(word);
            // If the wor was not present in the current partition, then just
            // use the zero vector.  Otherwise, use it distirbution.
            double[] semantics = (v == null) 
                ? zeroVector
                : Vectors.asDouble(v).toArray();

            temporalSemantics.put(currentSemanticPartitionStartTime,
                                  semantics);
        }
    }
private void updateTemporalSemantics ( long currentSemanticPartitionStartTime , SemanticSpace semanticPartition ) { double [ ] zeroVector = new double [ semanticPartition . getVectorLength ( ) ] ; for ( String word : interestingWords ) { SortedMap < Long , double [ ] > temporalSemantics = wordToTemporalSemantics . get ( word ) ; Vector v = semanticPartition . getVector ( word ) ; double [ ] semantics = ( v == null ) ? zeroVector : Vectors . asDouble ( v ) . toArray ( ) ; temporalSemantics . put ( currentSemanticPartitionStartTime , semantics ) ; } }
Adds the temporal semantics for each interesting word using the provided
semantic partition.

@param currentSemanticPartitionStartTime the start time of the semantic
partition