blob: 47df398ca57679dee601725555441bfc86408d1b [file] [log] [blame]
// Copyright 2014 Google Inc. All Rights Reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "third_party/eigen/Eigen/Core"
#include "third_party/eigen/Eigen/SparseCore"
namespace lossmin {
// Arrays.
typedef Eigen::Array<bool, Eigen::Dynamic, 1> ArrayXb;
typedef Eigen::ArrayXf ArrayXf;
typedef Eigen::ArrayXi ArrayXi;
// Vectors.
typedef Eigen::VectorXf VectorXf;
typedef Eigen::VectorXi VectorXi;
// Sparse Vectors.
typedef Eigen::SparseVector<float> SparseVectorXf;
// Matrix.
typedef Eigen::Matrix<
float,
Eigen::Dynamic,
Eigen::Dynamic,
Eigen::ColMajor> MatrixXf;
typedef Eigen::Matrix<
float,
Eigen::Dynamic,
Eigen::Dynamic,
Eigen::RowMajor> RowMatrixXf;
// Sparse Matrix.
typedef Eigen::SparseMatrix<float> SparseMatrixXf;
// Instances and parameters.
typedef VectorXf Weights;
typedef VectorXf Label;
typedef RowMatrixXf LabelSet;
typedef Eigen::SparseVector<float> Instance;
typedef Eigen::SparseMatrix<float, Eigen::RowMajor> InstanceSet;
typedef Eigen::SparseMatrix<float, Eigen::ColMajor> SparseMatrixXf;
typedef Eigen::SparseVector<float> SparseVectorXf;
} // namespace lossmin