Домой Классы Статические функции Перечисления (ENUM) Структуры (STRUCTURE)

{Vector|_of_REAL}


(включая защищенные члены)

CLASS {Vector|_of_REAL} , TESTED, OPERATORS:



IMPORT : {Mathematics} , {Sorting} .

REAL Items|_stored[] , READ


      

FUNCTION New_vector ( INT L|ength_vector ) ==> {Vector} , NEW



FUNCTION Vector|_from_fixed_array (
     
REAL A|rray_source [*] ) ==> {Vector} , NEW



FUNCTION Vector_2 (
     
REAL X|_coordinate ,
     
REAL Y|_coordinate ) ==> {Vector} , NEW



FUNCTION Vector_3 (
     
REAL X|_coordinate ,
     
REAL Y|_coordinate ,
     
REAL Z|_coordinate ) ==> {Vector} , NEW



METHOD Count|_items ==> INT



METHOD Len|gth_of_vector ==> INT



------------------------------------------------------------ 'access items'

   

METHOD . [ INT Index INDEXING REAL ] ==> REAL



METHOD set_item (
     
INT Index INDEXING REAL ,
     
REAL Value|_to_set ) , SETTER FOR .[]



METHOD Clone|_of_vector ==> {Vector} , NEW



----------------------------------------------------------------------- '*'

    

OPERATOR {Vector} * {Vector} ==> REAL



OPERATOR {Vector} * REAL ==> {Vector} , NEW



OPERATOR REAL * {Vector} ==> {Vector} , NEW



FUNCTION Power2|_of_vector (
     
{Vector} V|ector_to_power2 ) ==> REAL , OPERATORS



------------------------------------------------------------ '-A, A+B, A-B'

   

OPERATOR - {Vector} ==> {Vector} , NEW



OPERATOR {Vector} + {Vector} ==> {Vector} , NEW



OPERATOR {Vector} - {Vector} ==> {Vector} , NEW



------------------------------------------------------------- '|A|, A == B'

   

METHOD Module|_of_vector ==> REAL



METHOD Eq|ual_to_vector ( {Vector} C|ompare_to ) ==> BOOL



METHOD S|tr|ing_representation ==> STR



------------------------------------------------------------------- 'A x B'

  

FUNCTION x|_vector_product (
     
{Vector} A|_operand1 ,
     
{Vector} B|_operand2 ) ==> {Vector} , NEW , PUBLIC



FUNCTION Mixed|_product (
     
{Vector} A|_operand1 ,
     
{Vector} B|_operand2 ,
     
{Vector} C|_operand3 ) ==> REAL , OPERATORS


END