/*
  This file is part of the BJP package.

  BJP package is free software: you can redistribute it and/or modify it
  under the terms of the GNU Lesser General Public License as published by the
  Free Software Foundation, either version 3 of the License, or (at your
  option) any later version.

  BJP package is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with BJP package.  If not, see <http://www.gnu.org/licenses/>.
 */
package learn.struct.scoring;

import rep.UndirectedGraph;

/**
 * This is a simple data structure for storing the IB-scores
 *         of undirected graphs
 */
public class UndirectedGraphScore {

	private UndirectedGraph undirectedGraph;
	private double[][] markovBlanketClosureScores;
	private double[] variableScores;
	private double totalScore;
	private long testCounts;
	private long weightedTestCounts;

	public UndirectedGraphScore(UndirectedGraph undirectedGraph) {
		this.undirectedGraph = undirectedGraph;
		int n = undirectedGraph.getNumberOfNodes();
		markovBlanketClosureScores = new double[n][n];
		variableScores = new double[n];
	}

	public UndirectedGraph getUndirectedGraph() {
		return undirectedGraph;
	}

	public void setUndirectedGraph(UndirectedGraph undirectedGraph) {
		this.undirectedGraph = undirectedGraph;
	}

	public double[][] getMarkovBlanketClosureScores() {
		return markovBlanketClosureScores;
	}

	public void setMarkovBlanketClosureScores(
			double[][] markovBlanketClosureScores) {
		this.markovBlanketClosureScores = markovBlanketClosureScores;
	}

	public double getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(double totalScore) {
		this.totalScore = totalScore;
	}

	public double getVariableScore(int i) {
		return variableScores[i];
	}

	public void setVariableScore(int i, double variableScore) {
		variableScores[i] = variableScore;
	}

	public long getTestCounts() {
		return testCounts;
	}

	public long getWeightedTestCounts() {
		return weightedTestCounts;
	}

	public void setTestCounts(long testCounts) {
		this.testCounts = testCounts;
	}

	public void setWeightedTestCounts(long weightedTestCounts) {
		this.weightedTestCounts = weightedTestCounts;
	}

}
