//------------------------------------------------------------------------------------------------- //Ортогональный вектор public IntegerVector GetOrthogonalVector() { IntegerMatrix transformatingMatrix = this.CreateOrthogonalVectorTransformingMatrix(this.Size); IntegerVector orthogonalVector = transformatingMatrix * this; return(orthogonalVector); }
//------------------------------------------------------------------------------------- //Сложение векторов public static IntegerVector operator +(IntegerVector operandOne, IntegerVector operandTwo) { IntegerVector newVector = new IntegerVector(operandOne.Size); for (int index = 0; index < newVector.Size; index++) { newVector[index] = operandOne[index] + operandTwo[index]; } return(newVector); }
//------------------------------------------------------------------------------------ //Единичный вектор public static IntegerVector GetUnitVector(int size) { IntegerVector unitVector = new IntegerVector(size); for (int index = 0; index < unitVector.Size; index++) { unitVector[index] = 1; } return(unitVector); }
//------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------- //Умножение на число public static IntegerVector operator *(int value, IntegerVector vector) { IntegerVector newVector = new IntegerVector(vector.Size); for (int index = 0; index < vector.dataArray.Length; index++) { newVector[index] = vector[index] * value; } return(newVector); }
//------------------------------------------------------------------------------------ public IntegerVector(IntegerVector vector) : this(vector.dataArray) { }