src/ReplicatingMolecule2.java
/**
         * Makes a list of replicated segments at the elapsed time of this Record 
         * Units for endpoints of segments are nucleotides and bins
         * @param siteList  the list of potential Initiations sites at the elapsed time of replication of this record
         * @param cycle  the instance of DNASynthesis Cycle associated with this  replicating molecule
         * @return 
         */
Makes a list of replicated segments at the elapsed time of this Record
Units for endpoints of segments are nucleotides and bins
@param siteList  the list of potential Initiations sites at the elapsed time of replication of this record
@param cycle  the instance of DNASynthesis Cycle associated with this  replicating molecule
@return
Makes a list of replicated segments at the elapsed time of this Record Units for endpoints of segments are nucleotides and bins @param siteList the list of potential Initiations sites at the elapsed time of replication of this record @param cycle the instance of DNASynthesis Cycle associated with this replicating molecule @return
private void makeSegmentList() {
            if (cycle.getNumberNucleotidesReplicated() == 0) {
                return;
            }
            if (cycle.getNumberNucleotidesReplicated() == ParameterSet.SEQUENCE_LENGTH) {
                segmentList.add(0);
                replicatedBinList.add(0);
                segmentList.add(ParameterSet.SEQUENCE_LENGTH - 1);
                replicatedBinList.add(ParameterSet.NUMBER_BINS - 1);
                return;
            } 
            if ( ! cycle.getLeftEnd().getRightActivePIS().IsLeftForkActive()) {
                 segmentList.add(0);
                 replicatedBinList.add(0);
             }
             potentialInitSitesList.stream().filter(site -> site.IsActive()).forEach(activeSite -> {
                 if (activeSite.IsLeftForkActive()) {segmentList.add(activeSite.getPositionLeftFork()); replicatedBinList.add(activeSite.getPositionLeftFork() / binSize);}
                 if (activeSite.IsRightForkActive()) {segmentList.add(activeSite.getPositionRightFork()); replicatedBinList.add(activeSite.getPositionRightFork() / binSize);}
             });
             if ( ! cycle.getRightEnd().getLeftActivePIS().IsRightForkActive()) {
                 segmentList.add(sequenceLength - 1);
                 replicatedBinList.add((sequenceLength - 1) / binSize);
             }
        }
private void makeSegmentList ( ) { if ( cycle . getNumberNucleotidesReplicated ( ) == 0 ) { return ; } if ( cycle . getNumberNucleotidesReplicated ( ) == ParameterSet . SEQUENCE_LENGTH ) { segmentList . add ( 0 ) ; replicatedBinList . add ( 0 ) ; segmentList . add ( ParameterSet . SEQUENCE_LENGTH - 1 ) ; replicatedBinList . add ( ParameterSet . NUMBER_BINS - 1 ) ; return ; } if ( ! cycle . getLeftEnd ( ) . getRightActivePIS ( ) . IsLeftForkActive ( ) ) { segmentList . add ( 0 ) ; replicatedBinList . add ( 0 ) ; } potentialInitSitesList . stream ( ) . filter ( site -> site . IsActive ( ) ) . forEach ( activeSite -> { if ( activeSite . IsLeftForkActive ( ) ) { segmentList . add ( activeSite . getPositionLeftFork ( ) ) ; replicatedBinList . add ( activeSite . getPositionLeftFork ( ) / binSize ) ; } if ( activeSite . IsRightForkActive ( ) ) { segmentList . add ( activeSite . getPositionRightFork ( ) ) ; replicatedBinList . add ( activeSite . getPositionRightFork ( ) / binSize ) ; } } ) ; if ( ! cycle . getRightEnd ( ) . getLeftActivePIS ( ) . IsRightForkActive ( ) ) { segmentList . add ( sequenceLength - 1 ) ; replicatedBinList . add ( ( sequenceLength - 1 ) / binSize ) ; } }
Makes a list of replicated segments at the elapsed time of this Record
 Units for endpoints of segments are nucleotides and bins
 @param siteList  the list of potential Initiations sites at the elapsed time of replication of this record
 @param cycle  the instance of DNASynthesis Cycle associated with this  replicating molecule
 @return
Makes a list of replicated segments at the elapsed time of this Record Units for endpoints of segments are nucleotides and bins @param siteList the list of potential Initiations sites at the elapsed time of replication of this record @param cycle the instance of DNASynthesis Cycle associated with this replicating molecule @return
//if no replicated segments just return - nothing to make //if this is the last record - completely replicated the only segment is the whole genome