net.sf.tweety.logics.commons.analysis.MiInconsistencyMeasure Maven / Gradle / Ivy
/*
* This file is part of "Tweety", a collection of Java libraries for
* logical aspects of artificial intelligence and knowledge representation.
*
* Tweety is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as
* published by the Free Software Foundation.
*
* This program 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 this program. If not, see .
*
* Copyright 2016 The Tweety Project Team
*/
package net.sf.tweety.logics.commons.analysis;
import java.util.Collection;
import net.sf.tweety.commons.Formula;
/**
* This class models the MI inconsistency measure.
*
* @author Matthias Thimm
*/
public class MiInconsistencyMeasure extends BeliefSetInconsistencyMeasure {
/** The MUs enumerator. */
private MusEnumerator enumerator;
/**
* Creates a new inconsistency measure.
* @param enumerator some MUs enumerator
*/
public MiInconsistencyMeasure(MusEnumerator enumerator){
this.enumerator = enumerator;
}
/* (non-Javadoc)
* @see net.sf.tweety.logics.commons.analysis.BeliefSetInconsistencyMeasure#inconsistencyMeasure(java.util.Collection)
*/
@Override
public Double inconsistencyMeasure(Collection formulas) {
return new Double(this.enumerator.minimalInconsistentSubsets(formulas).size());
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
public String toString(){
return "mi";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy