src/SequenceDNA.java
/**
     * Returns atFunction corresponding to a given initiator site length
     * The function is a list with indices from 0 to sequence length - site length
     * the  index refers to the position of the first nucleotide in the interval of site length nucleotides
     * the algorithm is a bit too fancy - should just call atNumber on intervals of site length at each index 
     * but checked it against the alternative (commented out below)
     * @param initiatorSiteLength
     * @return 
     */
Returns atFunction corresponding to a given initiator site length
The function is a list with indices from 0 to sequence length - site length
the  index refers to the position of the first nucleotide in the interval of site length nucleotides
the algorithm is a bit too fancy - should just call atNumber on intervals of site length at each index
but checked it against the alternative (commented out below)
@param initiatorSiteLength
@return
Returns atFunction corresponding to a given initiator site length The function is a list with indices from 0 to sequence length - site length the index refers to the position of the first nucleotide in the interval of site length nucleotides the algorithm is a bit too fancy - should just call atNumber on intervals of site length at each index but checked it against the alternative ( commented out below ) @param initiatorSiteLength @return
public List<Integer> atFunction(int initiatorSiteLength) {
        if (atFunctionMap == null) {atFunctionMap = new HashMap<>();}
        if (atFunctionMap.keySet().contains(initiatorSiteLength)) {return atFunctionMap.get(initiatorSiteLength);}
        List<Integer> tempAtFunction = new ArrayList<>();
        tempAtFunction.add(atNumber(0, initiatorSiteLength - 1)); 
        for (int i = 1; i < sequenceLength - initiatorSiteLength + 1; i++) {  
            int numberAT = tempAtFunction.get(i - 1);  
            if (isCharAT(i - 1)) {numberAT--;}  
            if (isCharAT(i + initiatorSiteLength - 1)) {numberAT++;}  
            tempAtFunction.add(numberAT);
        }
        atFunctionMap.put(initiatorSiteLength, Collections.unmodifiableList(tempAtFunction));
        return atFunctionMap.get(initiatorSiteLength);
    }
public List < Integer > atFunction ( int initiatorSiteLength ) { if ( atFunctionMap == null ) { atFunctionMap = new HashMap < > ( ) ; } if ( atFunctionMap . keySet ( ) . contains ( initiatorSiteLength ) ) { return atFunctionMap . get ( initiatorSiteLength ) ; } List < Integer > tempAtFunction = new ArrayList < > ( ) ; tempAtFunction . add ( atNumber ( 0 , initiatorSiteLength - 1 ) ) ; for ( int i = 1 ; i < sequenceLength - initiatorSiteLength + 1 ; i ++ ) { int numberAT = tempAtFunction . get ( i - 1 ) ; if ( isCharAT ( i - 1 ) ) { numberAT -- ; } if ( isCharAT ( i + initiatorSiteLength - 1 ) ) { numberAT ++ ; } tempAtFunction . add ( numberAT ) ; } atFunctionMap . put ( initiatorSiteLength , Collections . unmodifiableList ( tempAtFunction ) ) ; return atFunctionMap . get ( initiatorSiteLength ) ; }
Returns atFunction corresponding to a given initiator site length
 The function is a list with indices from 0 to sequence length - site length
 the  index refers to the position of the first nucleotide in the interval of site length nucleotides
 the algorithm is a bit too fancy - should just call atNumber on intervals of site length at each index
 but checked it against the alternative (commented out below)
 @param initiatorSiteLength
 @return
Returns atFunction corresponding to a given initiator site length The function is a list with indices from 0 to sequence length - site length the index refers to the position of the first nucleotide in the interval of site length nucleotides the algorithm is a bit too fancy - should just call atNumber on intervals of site length at each index but checked it against the alternative ( commented out below ) @param initiatorSiteLength @return
//List<Integer> tempAtFunction2 = new ArrayList<>(); //number ATs in first initiator site //tempAtFunction2.add(atNumber(0, initiatorSiteLength - 1)); //iterates across sequence by one nuc at a time - ++numberAt if new AT at on right end - --numberAT if old AT at left end // number of ATs from i -1 to i + prcSiteLength -1 (total = prcSiteLenth) // character dropped //character added //tempAtFunction2.add(atNumber(i, i + initiatorSiteLength - 1));