// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/coding/ICodingAnnotationStudy.java
// public interface ICodingAnnotationStudy
//     extends IAnnotationStudy
// {
// 
//     // -- Categories --
// 
//     /**
//      * Returns true if, and only if, the annotation study contains at least one item with a missing
//      * value (i.e., an annotation item containing an annotation unit with category null).
//      */
//     public boolean hasMissingValues();
// 
//     // -- Items --
// 
//     /**
//      * Returns the annotation item with the given index. The first item has index 0.
//      */
//     public ICodingAnnotationItem getItem(int index);
// 
//     /** Allows iterating all annotation items of this study. */
//     public Iterable<ICodingAnnotationItem> getItems();
// 
//     /** Returns the number of annotation items defined by the study. */
//     public int getItemCount();
// 
//     // -- Units --
// 
//     /**
//      * Returns the number of annotation units defined by the study. That is, the number of
//      * annotations coded by the raters. If there are no missing values, the unit count equals the
//      * item count multiplied with the number of raters.
//      */
//     @Override
//     public int getUnitCount();
// 
// }
// 
// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/distance/IDistanceFunction.java
// public interface IDistanceFunction
// {
// 
//     /**
//      * Returns a distance value for the given pair of categories used within the given annotation
//      * study. Normally, the measure should return a distance of 0 if, and only if, the two
//      * categories are equal and a positive number otherwise.
//      */
//     public double measureDistance(final IAnnotationStudy study, final Object category1,
//             final Object category2);
// 
// }


import java.io.PrintStream;
import org.dkpro.statistics.agreement.coding.ICodingAnnotationStudy;
import org.dkpro.statistics.agreement.distance.IDistanceFunction;
/*
 * Copyright 2014
 * Ubiquitous Knowledge Processing (UKP) Lab
 * Technische Universität Darmstadt
 * 
 * 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 org.dkpro.statistics.agreement.visualization;



/**
 * Plain-text visualization for distance functions showing the distance scores between each pair of
 * categories.
 * 
 * @see IDistanceFunction
 * @author Christian M. Meyer
 */
public class DistanceMatrixPrinter
{
    /**
     * Print a matrix of the distances between each pair of categories.
     */
    public void print(final PrintStream out, final Iterable<Object> categories,
// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/coding/ICodingAnnotationStudy.java
// public interface ICodingAnnotationStudy
//     extends IAnnotationStudy
// {
// 
//     // -- Categories --
// 
//     /**
//      * Returns true if, and only if, the annotation study contains at least one item with a missing
//      * value (i.e., an annotation item containing an annotation unit with category null).
//      */
//     public boolean hasMissingValues();
// 
//     // -- Items --
// 
//     /**
//      * Returns the annotation item with the given index. The first item has index 0.
//      */
//     public ICodingAnnotationItem getItem(int index);
// 
//     /** Allows iterating all annotation items of this study. */
//     public Iterable<ICodingAnnotationItem> getItems();
// 
//     /** Returns the number of annotation items defined by the study. */
//     public int getItemCount();
// 
//     // -- Units --
// 
//     /**
//      * Returns the number of annotation units defined by the study. That is, the number of
//      * annotations coded by the raters. If there are no missing values, the unit count equals the
//      * item count multiplied with the number of raters.
//      */
//     @Override
//     public int getUnitCount();
// 
// }
// 
// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/distance/IDistanceFunction.java
// public interface IDistanceFunction
// {
// 
//     /**
//      * Returns a distance value for the given pair of categories used within the given annotation
//      * study. Normally, the measure should return a distance of 0 if, and only if, the two
//      * categories are equal and a positive number otherwise.
//      */
//     public double measureDistance(final IAnnotationStudy study, final Object category1,
//             final Object category2);
// 
// }


// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/visualization/DistanceMatrixPrinter.java
import java.io.PrintStream;
import org.dkpro.statistics.agreement.coding.ICodingAnnotationStudy;
import org.dkpro.statistics.agreement.distance.IDistanceFunction;

/*
 * Copyright 2014
 * Ubiquitous Knowledge Processing (UKP) Lab
 * Technische Universität Darmstadt
 * 
 * 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 org.dkpro.statistics.agreement.visualization;



/**
 * Plain-text visualization for distance functions showing the distance scores between each pair of
 * categories.
 * 
 * @see IDistanceFunction
 * @author Christian M. Meyer
 */
public class DistanceMatrixPrinter
{
    /**
     * Print a matrix of the distances between each pair of categories.
     */
    public void print(final PrintStream out, final Iterable<Object> categories,
            final IDistanceFunction distanceFunction)