Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Physics::Lorentz::Vector
Representation of 4-vectors

Physics::Lorentz::Vector - Representation of 4-vectors


NAME

Physics::Lorentz::Vector - Representation of 4-vectors


SYNOPSIS


  use Physics::Lorentz;

  my $rotation = Physics::Lorentz::Transformation->rotation_euler(

    $alpha, $beta, $gamma

  );

  my $vector = Physics::Lorentz::Vector->new([$t, $x, $y, $z]);

  my $rotated = $rotation->apply($vector);

  # or: $rotated = $rotation * $vector;

  

  ...


DESCRIPTION

This class is a representation of 4-vectors (such as 4-space [time, x, y, z] or 4-momentum E, kx, ky, kz).

EXPORT

None.

OVERLOADED INTERFACE

Addition (+) does the expected thing as does the assignment form (+=) of it.

Stringification is overloaded with the stringify method.

See also: the Physics::Lorentz::Transformation manpage.


METHODS

new

Creates a new Physics::Lorentz::Vector object. Defaults to [0,0,0,0] or cloning if no arguments are specified.

If one argument is present, this argument may either be a PDL which will be used internally as the PDL representation of the vector or an array reference to an array of four elements.

clone

Returns a copy of the object.

stringify

Returns a string representation of the object. Currently, this is the string representation of the internal PDL vector/matrix.

add

Adds two vectors. Syntax:


  $v3 = $v1->add($v2);

(This leaves $v1 and $v2 unchanged!)

get_pdl

Returns the PDL representation of the object. This is the actual PDL object used inside. Beware of action at a distance.


SEE ALSO

PDL, the Physics::Lorentz manpage, the Physics::Lorentz::Transformation manpage


AUTHOR

Steffen Müller, <smueller@cpan.org>


COPYRIGHT AND LICENSE

Copyright (C) 2006 by Steffen Müller

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.6 or, at your option, any later version of Perl 5 you may have available.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy