<commit_before>// Copyright (C) 1999-2017
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __vector3d_h__
#define __vector3d_h__

#include <math.h>
#include <float.h>

#include <iostream>
using namespace std;

class Vector;
class Matrix;
class Matrix3d;

class Vector3d {
 public:
  double v[4];

 public:
  Vector3d() 
    {v[0]=0;v[1]=0;v[2]=0;v[3]=1;}
  Vector3d(double* f) 
    {v[0]=f[0]; v[1]=f[1]; v[2]=f[2]; v[3]=1;}
  Vector3d(double x, double y) 
    {v[0]=x;v[1]=y;v[2]=0;v[3]=1;}
  Vector3d(double x, double y, double z) 
    {v[0]=x;v[1]=y;v[2]=z;v[3]=1;}

  Vector3d(const Vector&);
  Vector3d(const Vector&, double);
  Vector3d& operator=(const Vector&);
  
  Vector3d(const Vector3d& a) 
    {v[0]=a.v[0];v[1]=a.v[1];v[2]=a.v[2];v[3]=a.v[3];}
  Vector3d& operator=(const Vector3d& a) 
    {v[0]=a.v[0];v[1]=a.v[1];v[2]=a.v[2];v[3]=a.v[3]; return *this;}

  double& operator[](int i) {return v[i];} // return element
  double* vv() {return v;} // return vector

  Vector3d& operator+=(const Vector3d& a) // addition<commit_msg>update AST WCS<commit_after>// Copyright (C) 1999-2017
// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
// For conditions of distribution and use, see copyright notice in "copyright"

#ifndef __vector3d_h__
#define __vector3d_h__

#include <math.h>
#include <float.h>

#include <iostream>
using namespace std;

class Vector;
class Matrix;
class Matrix3d;

class Vector3d {
 public:
  double v[4];

 public:
  Vector3d() 
    {v[0]=0;v[1]=0;v[2]=0;v[3]=1;}
  Vector3d(double* f) 
    {v[0]=f[0]; v[1]=f[1]; v[2]=f[2]; v[3]=1;}
  Vector3d(double x, double y) 
    {v[0]=x;v[1]=y;v[2]=0;v[3]=1;}
  Vector3d(double x, double y, double z) 
    {v[0]=x;v[1]=y;v[2]=z;v[3]=1;}

  Vector3d(const Vector&);
  Vector3d(const Vector&, double);
  Vector3d& operator=(const Vector&);
  
  Vector3d(const Vector3d& a) 
    {v[0]=a.v[0];v[1]=a.v[1];v[2]=a.v[2];v[3]=a.v[3];}
  Vector3d& operator=(const Vector3d& a) 
    {v[0]=a.v[0];v[1]=a.v[1];v[2]=a.v[2];v[3]=a.v[3]; return *this;}

  double& operator[](int i) {return v[i];} // return element
  const double& operator[](int i) const {return v[i];} // return element
  double* vv() {return v;} // return vector

  Vector3d& operator+=(const Vector3d& a) // addition
{'fraction_non_alphanumeric': 0.21204410517387617, 'fraction_numerical': 0.058524173027989825, 'mean_word_length': 4.630071599045346, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '4192350', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1017, 'n_words': 216}