<commit_before>//----------------------------  vector.templates.h  ---------------------------
//    $Id$
//    Version: $Name$
//
//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//----------------------------  vector.templates.h  ---------------------------
#ifndef __deal2__vector_templates_h
#define __deal2__vector_templates_h


#include <lac/vector.h>

#ifdef DEAL_II_USE_PETSC
#  include <lac/petsc_vector.h>
#  include <lac/petsc_parallel_vector.h>
#endif

#include <cmath>
#include <algorithm>
#include <iostream>


/*
  Note that in this file, we use std::fabs, std::sqrt, etc
  everywhere. The reason is that we want to use those version of these
  functions that take a variable of the template type "Number", rather
  than the C standard function which accepts and returns a double. The
  C++ standard library therefore offers overloaded versions of these
  functions taking floats, or long doubles, with the importance on the
  additional accuracy when using long doubles.
 */

namespace internal
{
  namespace VectorHelper
  {
    template <typename Number>
    static inline Number sqr (const Number x)
    {
      return x*x;
    }
  }
}




template <typename Number>
Vector<Number>::Vector (const Vector<Number>& v)
                :
		dim(v.size()),
		maxdim(v.size()),
		val(0)
{
  if (dim != 0)
    {
      val = new Number[maxdim];
      Assert (val != 0, ExcOutOfMemory());
      std::copy (v.begin(), v.end(), begin());
    }
}


#ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG

template <typename Number>
template <typename OtherNumber>
Vector<Number>::Vector (const Vector<OtherNumber>& v)<commit_msg>Inline functions don't need to be static.<commit_after>//----------------------------  vector.templates.h  ---------------------------
//    $Id$
//    Version: $Name$
//
//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//----------------------------  vector.templates.h  ---------------------------
#ifndef __deal2__vector_templates_h
#define __deal2__vector_templates_h


#include <lac/vector.h>

#ifdef DEAL_II_USE_PETSC
#  include <lac/petsc_vector.h>
#  include <lac/petsc_parallel_vector.h>
#endif

#include <cmath>
#include <algorithm>
#include <iostream>


/*
  Note that in this file, we use std::fabs, std::sqrt, etc
  everywhere. The reason is that we want to use those version of these
  functions that take a variable of the template type "Number", rather
  than the C standard function which accepts and returns a double. The
  C++ standard library therefore offers overloaded versions of these
  functions taking floats, or long doubles, with the importance on the
  additional accuracy when using long doubles.
 */

namespace internal
{
  namespace VectorHelper
  {
    template <typename Number>
    inline Number sqr (const Number x)
    {
      return x*x;
    }
  }
}




template <typename Number>
Vector<Number>::Vector (const Vector<Number>& v)
                :
		dim(v.size()),
		maxdim(v.size()),
		val(0)
{
  if (dim != 0)
    {
      val = new Number[maxdim];
      Assert (val != 0, ExcOutOfMemory());
      std::copy (v.begin(), v.end(), begin());
    }
}


#ifndef DEAL_II_EXPLICIT_CONSTRUCTOR_BUG

template <typename Number>
template <typename OtherNumber>
Vector<Number>::Vector (const Vector<OtherNumber>& v)
{'fraction_non_alphanumeric': 0.15671838022613727, 'fraction_numerical': 0.017354719957927953, 'mean_word_length': 2.63323782234957, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '7648063', 'n_tokens_mistral': 1198, 'n_tokens_neox': 1096, 'n_words': 390}