Sha256: a5f8c58d679a15fb0299996c5997dc4a3ef6dfe526543d3a74842810d53f216d

Contents?: true

Size: 494 Bytes

Versions: 11

Compression:

Stored size: 494 Bytes

Contents

/**
 * Copyright (c) 2016-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#include "matrix.h"

namespace fasttext {

Matrix::Matrix() : m_(0), n_(0) {}

Matrix::Matrix(int64_t m, int64_t n) : m_(m), n_(n) {}

int64_t Matrix::size(int64_t dim) const {
  assert(dim == 0 || dim == 1);
  if (dim == 0) {
    return m_;
  }
  return n_;
}

} // namespace fasttext

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
fasttext-0.4.0 vendor/fastText/src/matrix.cc
fasttext-0.3.0 vendor/fastText/src/matrix.cc
fasttext-0.2.4 vendor/fastText/src/matrix.cc
fasttext-0.2.3 vendor/fastText/src/matrix.cc
fasttext-0.2.2 vendor/fastText/src/matrix.cc
fasttext-0.2.1 vendor/fastText/src/matrix.cc
fasttext-0.2.0 vendor/fastText/src/matrix.cc
fasttext-0.1.3 vendor/fastText/src/matrix.cc
fasttext-0.1.2 vendor/fastText/src/matrix.cc
fasttext-0.1.1 vendor/fastText/src/matrix.cc
fasttext-0.1.0 vendor/fastText/src/matrix.cc