/**
 * Copyright 2015 Alessandro Daniele, Fabio Cesarato, Andrea Giraldin
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.salsaw.salsa.algorithm;

import java.util.ArrayList;

/**
 * @author Alessandro Daniele, Fabio Cesarato, Andrea Giraldin
 *
 */
public final class Alignment {
	// FIELDS
	
	// CONSTRUCTOR
	Alignment(String fileName, String treeFileName, SubstitutionMatrix s, float g, TerminalGAPsStrategy tgs) {
	}

	// GET / SET
	public final int getNumberOfSequences() {
		// TODO Report code from c
		return 0;
	}
	
	public final int getLength() {
		// TODO Report code from c
		return 0;
	}
	
	public final ArrayList<GAP> getGAPS() {
		// TODO Report code from c
		return null;
	}
	
	// METHODS

	/**
	 * Calculate the WSP-score (in the classic way, without using the counters)
	 * @return
	 */
	public final float WSP() {
		// TODO Report code from c
		return 0;
	}
	
	public final TerminalGAPsStrategy getTerminalGAPStrategy() {
		// TODO Report code from c
		return null;
	}

	/**
	 * They move a GAP of one position and return the improvement in the WSP-Score due to this change
	 * 
	 * @param g
	 * @return
	 */
	public final float moveLeft(GAP g) {
		// TODO Report code from c
		return 0;
	}
	
	public final float moveRight(GAP g) {
		// TODO Report code from c
		return 0;
	}
	
	/**
	 * Same as moveLeft and moveRight, but the improvement is not returned (not even calculated).
	 * Used to do the backtracking and restore the cell as before the movement of the GAP g.
	 * 
	 * @param g
	 */
	public final void goBackToLeft(GAP g) {
		// TODO Report code from c
	}
	
	public final void goBackToRight(GAP g) {
		// TODO Report code from c
	}

	/**
	 * It returns the penalty of adding a GOP in the specified row (it depends on the weight of the row).
	 * 
	 * @param row
	 * @return
	 */
	public final float getGOP(int row) {
		// TODO Report code from c
		return 0;
	}

	public final void save(String fileName) {
		// TODO Report code from c
	}
}

@@ -819,24 +819,680 @@
 DS%0A%09
-%0A%09// CONSTRUCTOR
+private int numberOfSequences;%0A%09private int length;%0A%09/**%0A%09 * The alignment%0A%09 */%0A%09private int%5B%5D alignMatrix;%0A%09private SubstitutionMatrix substitution;%0A%09private Alphabet alphabet;%0A%09/**%0A%09 * Sequences name and properties (found in FASTA files)%0A%09 */%0A%09private ArrayList%3CString%3E properties;%0A%09private float%5B%5D weights;%0A%09private float weightsSUM;%0A%09private ArrayList%3CGAP%3E GAPS;%0A%0A%09private float%5B%5D countersMatrix;%0A%0A%09/**%0A%09 * GAP opening penalty%0A%09 */%0A%09private float GOP;%0A%0A%09private TerminalGAPsStrategy terminal;%09%0A%09%0A%09// CONSTRUCTORS%0A%09Alignment(String fileName, String treeFileName, SubstitutionMatrix s, float g) %7B%0A%09%09this(fileName, treeFileName, s, g, TerminalGAPsStrategy.ONLY_GEP);%0A%09%7D%0A%09
 %0A%09Al

Add fileds of Aligment