<commit_before>// $Id: type_vector.h,v 1.18 2006-10-12 22:09:32 roystgnr Exp $

// The libMesh Finite Element Library.
// Copyright (C) 2002-2005  <NAME>, <NAME>
  
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
  
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
  
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



#ifndef __type_vector_h__
#define __type_vector_h__

// C++ includes
#include <cmath>

// Local includes
#include "libmesh_common.h"

// Copy of boost enable_if_c

namespace boostcopy {
  template <bool B, class T = void>
    struct enable_if_c {
      typedef T type;
    };

  template <class T>
    struct enable_if_c<false, T> {};

}

// Complete list of scalar classes, needed for disambiguation
template <typename T>
struct ScalarTraits {
  const static bool value = false;
};

template<>
struct ScalarTraits<float> { const static bool value = true; };

template<>
struct ScalarTraits<double> { const static bool value = true; };

template<>
struct ScalarTraits<long double> { const static bool value = true; };

template<>
struct ScalarTraits<std::complex<float> > { const static bool value = true; };

template<>
struct ScalarTraits<std::complex<double> > { const static bool value = true; };

template<>
struct ScalarTraits<std::complex<long double> > { const static bool value = true; };


// Forward declaration for friend class
template <typename T>
class TypeTensor;


/**
 * This class defines a vector in \p DIM dimensional space of type T.
 * T may either be Real or Complex.  The default constructor for
 * this class is protected, suggesting that you should not instantiate
 * one of these directly.  Instead use one of the derived types: \p Point
 * for a real-valued point in DIM-space, or \p SpaceVector for a real
 * or complex-valued vector in DIM-space.
 *
 * \author <NAME>, 2003. 
 */

template <typename T>
class TypeVector
{
friend class TypeTensor<T>;

protected:

  /**
   * Constructor.  By default sets all entries to 0.  Gives the vector 0 in
   * \p DIM dimensions.<commit_msg>Declare "static const" instead of "const static" to avoid compiler warnings<commit_after>// $Id: type_vector.h,v 1.19 2007-05-24 19:17:03 roystgnr Exp $

// The libMesh Finite Element Library.
// Copyright (C) 2002-2005  <NAME>, <NAME>
  
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
  
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
  
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



#ifndef __type_vector_h__
#define __type_vector_h__

// C++ includes
#include <cmath>

// Local includes
#include "libmesh_common.h"

// Copy of boost enable_if_c

namespace boostcopy {
  template <bool B, class T = void>
    struct enable_if_c {
      typedef T type;
    };

  template <class T>
    struct enable_if_c<false, T> {};

}

// Complete list of scalar classes, needed for disambiguation
template <typename T>
struct ScalarTraits {
  static const bool value = false;
};

template<>
struct ScalarTraits<float> { static const bool value = true; };

template<>
struct ScalarTraits<double> { static const bool value = true; };

template<>
struct ScalarTraits<long double> { static const bool value = true; };

template<>
struct ScalarTraits<std::complex<float> > { static const bool value = true; };

template<>
struct ScalarTraits<std::complex<double> > { static const bool value = true; };

template<>
struct ScalarTraits<std::complex<long double> > { static const bool value = true; };


// Forward declaration for friend class
template <typename T>
class TypeTensor;


/**
 * This class defines a vector in \p DIM dimensional space of type T.
 * T may either be Real or Complex.  The default constructor for
 * this class is protected, suggesting that you should not instantiate
 * one of these directly.  Instead use one of the derived types: \p Point
 * for a real-valued point in DIM-space, or \p SpaceVector for a real
 * or complex-valued vector in DIM-space.
 *
 * \author <NAME>, 2003. 
 */

template <typename T>
class TypeVector
{
friend class TypeTensor<T>;

protected:

  /**
   * Constructor.  By default sets all entries to 0.  Gives the vector 0 in
   * \p DIM dimensions.
{'fraction_non_alphanumeric': 0.08956916099773243, 'fraction_numerical': 0.017762660619803475, 'mean_word_length': 3.71326803205699, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 55, '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': '6977425', 'n_tokens_mistral': 1589, 'n_tokens_neox': 1492, 'n_words': 687}