src/ReplicatingMolecule2.java
/**
     * Updates a list of the replication time of each bin for this molecule
     * Updating occurs lazily if needed by call to getTimeOfReplicationInBins
     * The time of replication is the time at which a fork first enters the bin
     * Algorithm sets any element of replicated bin list within a replicated sement that is equal to 0.0 (not previously updated) to the current time
     * @param record a state record - called with this set to current state recored
     */
Updates a list of the replication time of each bin for this molecule
Updating occurs lazily if needed by call to getTimeOfReplicationInBins
The time of replication is the time at which a fork first enters the bin
Algorithm sets any element of replicated bin list within a replicated sement that is equal to 0.0 (not previously updated) to the current time
@param record a state record - called with this set to current state recored
Updates a list of the replication time of each bin for this molecule Updating occurs lazily if needed by call to getTimeOfReplicationInBins The time of replication is the time at which a fork first enters the bin Algorithm sets any element of replicated bin list within a replicated sement that is equal to 0 . 0 ( not previously updated ) to the current time @param record a state record - called with this set to current state recored
private void updateTimeOfReplication(StateRecord2 record) {
        List<Integer> replicatedBinList = record.getReplicatedBinList();
        if (record.nucleotidesReplicated == 0) {return;}
        for (int i = 0; i < replicatedBinList.size() - 1; i+=2) {
            int leftIndex = replicatedBinList.get(i); 
            int rightIndex = replicatedBinList.get(i + 1); 
            for (int j = leftIndex; j <= rightIndex; j++) {
                if (timeOfReplicatonInBins.get(j) == 0) {timeOfReplicatonInBins.set(j, record.getTime());}
            }
        }
    }
private void updateTimeOfReplication ( StateRecord2 record ) { List < Integer > replicatedBinList = record . getReplicatedBinList ( ) ; if ( record . nucleotidesReplicated == 0 ) { return ; } for ( int i = 0 ; i < replicatedBinList . size ( ) - 1 ; i += 2 ) { int leftIndex = replicatedBinList . get ( i ) ; int rightIndex = replicatedBinList . get ( i + 1 ) ; for ( int j = leftIndex ; j <= rightIndex ; j ++ ) { if ( timeOfReplicatonInBins . get ( j ) == 0 ) { timeOfReplicatonInBins . set ( j , record . getTime ( ) ) ; } } } }
Updates a list of the replication time of each bin for this molecule
 Updating occurs lazily if needed by call to getTimeOfReplicationInBins
 The time of replication is the time at which a fork first enters the bin
 Algorithm sets any element of replicated bin list within a replicated sement that is equal to 0.0 (not previously updated) to the current time
 @param record a state record - called with this set to current state recored
Updates a list of the replication time of each bin for this molecule Updating occurs lazily if needed by call to getTimeOfReplicationInBins The time of replication is the time at which a fork first enters the bin Algorithm sets any element of replicated bin list within a replicated sement that is equal to 0 . 0 ( not previously updated ) to the current time @param record a state record - called with this set to current state recored
//get the list of bins that have replicated as of this record //iterate over replicatedBinList //Bin icontaining left end of segment //Bin containing right end of segment //iterate over segment setting any zero elements to elapsed time