<commit_before>/**
 * Copyright (C) 2009 - 2010 by OpenGamma Inc.
 * 
 * Please see distribution for license.
 */
package com.opengamma.math.matrix;

import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import cern.colt.matrix.DoubleFactory1D;
import cern.colt.matrix.DoubleFactory2D;
import cern.colt.matrix.linalg.Algebra;

/**
 * @author emcleod
 * 
 */
public class ColtMatrixAlgebra extends MatrixAlgebra {
  private final Algebra _algebra = new Algebra();

  @Override
  public double getCondition(final Matrix<?> m) {
    if (m instanceof DoubleMatrix2D) {
      return _algebra.cond(DoubleFactory2D.dense.make(((DoubleMatrix2D) m).getDataAsPrimitiveArray()));
    }
    throw new IllegalArgumentException("Can only find condition of DoubleMatrix2D; have " + m.getClass());
  }
<commit_msg>Stupid classes having the same names.<commit_after>/**
 * Copyright (C) 2009 - 2010 by OpenGamma Inc.
 * 
 * Please see distribution for license.
 */
package com.opengamma.math.matrix;

import org.apache.commons.lang.NotImplementedException;

import cern.colt.matrix.DoubleFactory1D;
import cern.colt.matrix.DoubleFactory2D;
import cern.colt.matrix.linalg.Algebra;

/**
 * @author emcleod
 * 
 */
public class ColtMatrixAlgebra extends MatrixAlgebra {
  private final Algebra _algebra = new Algebra();

  @Override
  public double getCondition(final Matrix<?> m) {
    if (m instanceof DoubleMatrix2D) {
      return _algebra.cond(DoubleFactory2D.dense.make(((DoubleMatrix2D) m).getDataAsPrimitiveArray()));
    }
    throw new IllegalArgumentException("Can only find condition of DoubleMatrix2D; have " + m.getClass());
  }

{'fraction_non_alphanumeric': 0.10792682926829268, 'fraction_numerical': 0.01707317073170732, 'mean_word_length': 4.581632653061225, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5521889', 'n_tokens_mistral': 517, 'n_tokens_neox': 492, 'n_words': 123}