<commit_before>//==============================================================================
// SMatrix.hpp
// Created 4/28/12.
//==============================================================================

//==============================================================================
/*
 * Defines classes for representing symmetric, Hermtian, lower triangular,
 * and upper triangular matrices.
 * Should add a skew-symmetric matrix class when needed.
 *
 * All types are derived from SMatrixBase, which stores only the elements on
 * the diagonal and below.
 */
//==============================================================================

#ifndef ESTDLIB_SMATRIX
#define ESTDLIB_SMATRIX

#include <iostream>
#include <iomanip>
#include "Matrix.hpp"


//==============================================================================
// Base Classes and Template Functions
//==============================================================================

//------------------------------------------------------------------------------
// Base class from which all matrix classes defined in this file are derived.
// It only stores the lower triangular portion of a square matrix.
template <class T>
class SMatrixBase {
private:
   T* _data;               // matrix data, holds diagonal and below
   unsigned _d;            // number of rows and columns
   unsigned _maxD;         // allocated space

public:
   static const T _zero;   // used when a const& to zero is needed
   
public:<commit_msg>updated docs for hpp/SMatrix.hpp<commit_after>//==============================================================================
// SMatrix.hpp
// Created 4/28/12.
//==============================================================================

//==============================================================================
/*
 * Defines classes for representing symmetric, Hermtian, lower triangular,
 * and upper triangular matrices.
 * Should add a skew-symmetric matrix class when needed.
 *
 * All types are derived from SMatrixBase, which stores only the elements on
 * the diagonal and below.
 *
 * Don't forget to set SMatrixBase<T>::_zero for all necessary T! For example,
   template<>
   const float SMatrixBase<float>::_zero = 0.0;
 * could go at the top of main.cpp (before the main method).
 */
//==============================================================================

#ifndef ESTDLIB_SMATRIX
#define ESTDLIB_SMATRIX

#include <iostream>
#include <iomanip>
#include "Matrix.hpp"


//==============================================================================
// Base Classes and Template Functions
//==============================================================================

//------------------------------------------------------------------------------
// Base class from which all matrix classes defined in this file are derived.
// It only stores the lower triangular portion of a square matrix.
template <class T>
class SMatrixBase {
private:
   T* _data;               // matrix data, holds diagonal and below
   unsigned _d;            // number of rows and columns
   unsigned _maxD;         // allocated space

public:
   static const T _zero;   // used when a const& to zero is needed
   
public:
{'fraction_non_alphanumeric': 0.3951414514145141, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 3.6011315417256013, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 12, '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': '1724757', 'n_tokens_mistral': 720, 'n_tokens_neox': 642, 'n_words': 265}