All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.shapleyvalue.util.permutation.NodeValue Maven / Gradle / Ivy

The newest version!
package org.shapleyvalue.util.permutation;

import java.util.ArrayList;
import java.util.List;

public class NodeValue {
	
	@Override
	public String toString() {
		return "NodeValue [value=" + value + ", nextValues=" + nextValues + "]";
	}

	private Integer value;
	
	private List nextValues;
	
	public NodeValue(List nextValues) {
		
		this.nextValues = new ArrayList<>();
		this.nextValues.addAll(nextValues);
		this.value = nextValues.get(0);
		this.nextValues.remove(value);
	}

	public Integer getValue() {
		return value;
	}
	
	public List getNextValues() {
		return new ArrayList<>(nextValues);
	}

	public void updateValue() {
		if(!nextValues.isEmpty())
			value = nextValues.get(0);
		nextValues.remove(value);
		
	}



}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy