Loading...
Searching...
No Matches
vector-extensions.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2016 INESC TEC
4 * Copyright (c) 2021 CNES
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation;
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Code from https://gitlab.inesctec.pt/pmms/ns3-satellite
20 *
21 * Author: Pedro Silva <pmms@inesctec.pt>
22 * Author: Bastien Tauran <bastien.tauran@viveris.fr>
23 */
24
25#ifndef SATELLITE_VECTOR_EXTENSIONS_H
26#define SATELLITE_VECTOR_EXTENSIONS_H
27
28#include "ns3/vector.h"
29
30namespace ns3
31{
32
42
49Vector3D operator+(const Vector3D& v1, const Vector3D& v2);
50
57Vector3D operator-(const Vector3D& v1, const Vector3D& v2);
58
65Vector3D operator*(const Vector3D& vector, double scalar);
66
73Vector3D operator*(double scalar, const Vector3D& vector);
74
81Vector3D CrossProduct(const Vector3D& v1, const Vector3D& v2);
82
89double DotProduct(const Vector3D& v1, const Vector3D& v2);
90
96double Magnitude(const Vector3D& vector);
97
103double MagnitudeSquared(const Vector3D& vector);
104
105} // namespace ns3
106
107#endif /* SATELLITE_VECTOR_EXTENSIONS_H */
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
Vector3D operator*(const Vector3D &vector, double scalar)
Multiplication between a Vector3D object and a scalar.
double Magnitude(const Vector3D &vector)
Magnitude of a Vector3D object.
double DotProduct(const Vector3D &v1, const Vector3D &v2)
Dot product of two Vector3D objects.
Vector3D operator-(const Vector3D &v1, const Vector3D &v2)
Subtraction of Vector3D objects.
Vector3D operator+(const Vector3D &v1, const Vector3D &v2)
extensions to ns3::Vector3D to support additional operations
double MagnitudeSquared(const Vector3D &vector)
The square of the magnitude of a Vector3D object.
Vector3D CrossProduct(const Vector3D &v1, const Vector3D &v2)
Cross product of two Vector3D objects.