X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFBaseDoubleMatrix.h;h=04f65b99e2832dbce351501a4e2b074458c29fc8;hb=72749ddd32dd1e3e2833ada50fad8fceefbdcddc;hp=db0ebfd3a3bcc002fc07522162a41f982ff981f0;hpb=84ae32fc9014edf1457554db60000885285034ff;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FBaseDoubleMatrix.h b/inc/FBaseDoubleMatrix.h index db0ebfd..04f65b9 100644 --- a/inc/FBaseDoubleMatrix.h +++ b/inc/FBaseDoubleMatrix.h @@ -1,5 +1,4 @@ // -// Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); @@ -22,7 +21,6 @@ * This header file contains the declarations of the %DoubleMatrix class. * */ - #ifndef _FBASE_DOUBLE_MATRIX_H_ #define _FBASE_DOUBLE_MATRIX_H_ @@ -38,7 +36,7 @@ namespace Tizen { namespace Base * * @since 2.0 * - * The %DoubleMatrix class provides a @c double precision, two-dimensional matrix class. + * The %DoubleMatrix class provides a @c double precision, two-dimensional matrix. * */ class _OSP_EXPORT_ DoubleMatrix @@ -50,12 +48,12 @@ public: * * @since 2.0 * - * @param[in] rhs An instance of %DoubleMatrix + * @param[in] rhs An instance of %DoubleMatrix to copy */ DoubleMatrix(const DoubleMatrix& rhs); /** - * Constructs a row by column null matrix in which all elements are zero. + * Constructs a row by column null matrix in which all the elements are zero. * * @since 2.0 * @@ -71,9 +69,10 @@ public: * * @param[in] rowCount The number of rows in the current instance * @param[in] columnCount The number of columns in the current instance - * @param[in] pArray A one-dimensional array @n The array must be at least row * column in length. + * @param[in] pArray The one-dimensional array @n + * The array must be at least row * column in length. * @param[in] rowMajor Set to @c true to copy the array in row-major order, @n - * else @c copy in column-major order + * else @c copy in column-major order */ DoubleMatrix(int rowCount, int columnCount, const double* pArray, bool rowMajor = true); @@ -84,7 +83,8 @@ public: * * @param[in] rowCount The number of rows in the current instance * @param[in] columnCount The number of columns in the current instance - * @param[in] pArray[] A two-dimensional array @n The array must be at least row * column in length. + * @param[in] pArray[] The two-dimensional array @n + * The array must be at least row * column in length. */ DoubleMatrix(int rowCount, int columnCount, const double* pArray[]); @@ -101,8 +101,8 @@ public: * * @since 2.0 * - * @return @c true if all matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n - * else @c false + * @return @c true if all the matrix members of the current instance are equal to the corresponding matrix members in the specified instance, @n + * else @c false * @param[in] rhs An instance of %DoubleMatrix */ bool operator ==(const DoubleMatrix& rhs) const; @@ -112,8 +112,8 @@ public: * * @since 2.0 * - * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n - * else @c false + * @return @c true if all matrix members of the current instance are not equal to the corresponding matrix members in the specified instance, @n + * else @c false * @param[in] rhs An instance of %DoubleMatrix */ bool operator !=(const DoubleMatrix& rhs) const; @@ -123,12 +123,13 @@ public: * * @since 2.0 * - * @return The reference to this instance - * @param[in] rhs An instance of %DoubleMatrix - * @exception E_INVALID_ARG Either row or column count of the current instance is not same with that of the specified instance. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If either row or column count of the current instance is not same with that of the specified instance, - * return the reference to this instance without assigning. + * @return A reference to this instance + * @param[in] rhs An instance of %DoubleMatrix + * @exception E_INVALID_ARG Either the row or the column count of the current instance is not same as that of the specified instance. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If either the row or the column count of the current instance is not same as that of the specified instance, + * this method returns the reference to this instance without assigning. */ DoubleMatrix& operator =(const DoubleMatrix& rhs); @@ -137,10 +138,12 @@ public: * * @since 2.0 * - * @return @c true if the values of the current instance are equal to the value of the specified instance, @n - * else @c false + * @return @c true if the values of the current instance are equal to the values of the specified instance, @n + * else @c false * @param[in] obj An instance of %DoubleMatrix - * @remarks This method overrides Tizen::Base::Object::Equals(). This method uses the values of the Matrix components to compare the two instances. + * @remarks + * - This method overrides Tizen::Base::Object::Equals(). + * - This method uses the values of the Matrix components to compare the two instances. */ virtual bool Equals(const Tizen::Base::Object& obj) const; @@ -149,9 +152,9 @@ public: * * @since 2.0 * - * @return The hash value of the current instance - * @remarks Two equal instances must return the same hash value. For better performance, - * the used hash function must generate a random distribution for all inputs. + * @return The hash value of the current instance + * @remarks Two equal instances must return the same hash value. @n + * For better performance, the used hash function must generate a random distribution for all the inputs. */ virtual int GetHashCode(void) const; @@ -161,27 +164,27 @@ public: * @since 2.0 * * @return An error code - * @param[in] matrix An instance of %DoubleMatrix - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either row or column count of the current instance is not same with that of the specified instance. + * @param[in] matrix An instance of %DoubleMatrix + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either the row or the column count of the current instance is not same as that of the specified instance. */ result Add(const DoubleMatrix& matrix); /** - * Adds the value to each matrix members of the current instance of %DoubleMatrix. + * Adds the value to each matrix member of the current instance of %DoubleMatrix. * * @since 2.0 * - * @param[in] value A @c double value to add + * @param[in] value The @c double value to add */ void AddToEachElement(double value); /** - * Gets the number of column in the current instance of %DoubleMatrix. + * Gets the number of columns in the current instance of %DoubleMatrix. * * @since 2.0 * - * @return The number of column in the current instance + * @return The number of columns in the current instance */ int GetColumnCount(void) const; @@ -190,10 +193,10 @@ public: * * @since 2.0 * - * @return A pointer to @c double array - * @param[in] columnIndex The target column number in the current instance + * @return A pointer to the @c double array + * @param[in] columnIndex The target column number in the current instance * @exception E_INVALID_ARG The @c columnIndex is larger than the column count of the current instance. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ double* GetColumnN(int columnIndex) const; @@ -202,10 +205,11 @@ public: * * @since 2.0 * - * @return The determinant value of the current instance - * @exception E_INVALID_OPERATION The current instance is not a square matrix. - * @remarks The specific error code can be accessed using the GetLastResult() method. - * @remarks If the current instance is not a square matrix, return zero. + * @return The determinant value of the current instance + * @exception E_INVALID_OPERATION The current instance is not a square matrix. + * @remarks + * - The specific error code can be accessed using the GetLastResult() method. + * - If the current instance is not a square matrix, this method returns zero. */ double GetDeterminant(void) const; @@ -214,11 +218,11 @@ public: * * @since 2.0 * - * @return The value at the specified row and column of the current instance - * @param[in] rowIndex The target row number in the current instance - * @param[in] columnIndex The target column number in the current instance - * @exception E_INVALID_ARG The @c columnIndex or @c rowIndex is larger than that of the current instance. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @return The value at the specified row and column of the current instance + * @param[in] rowIndex The target row number in the current instance + * @param[in] columnIndex The target column number in the current instance + * @exception E_INVALID_ARG The @c columnIndex or @c rowIndex is larger than that of the current instance. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ double GetElement(int rowIndex, int columnIndex) const; @@ -227,18 +231,18 @@ public: * * @since 2.0 * - * @return A pointer to the instance of %DoubleMatrix containing the resulting value of the operation - * @exception E_INVALID_OPERATION The current instance is not a square matrix. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @return A pointer to the instance of %DoubleMatrix that contains the resulting value of the operation + * @exception E_INVALID_OPERATION The current instance is not a square matrix. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ DoubleMatrix* GetInverseN(void) const; /** - * Gets the number of row in the current instance of %DoubleMatrix. + * Gets the number of rows in the current instance of %DoubleMatrix. * * @since 2.0 * - * @return The number of row in the current instance + * @return The number of rows in the current instance */ int GetRowCount(void) const; @@ -247,10 +251,10 @@ public: * * @since 2.0 * - * @return A pointer to @c double array - * @param[in] rowIndex The target row number in the current instance + * @return A pointer to the @c double array + * @param[in] rowIndex The target row number in the current instance * @exception E_INVALID_ARG The @c rowIndex is larger than the row count of the current instance. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ double* GetRowN(int rowIndex) const; @@ -260,8 +264,8 @@ public: * @since 2.0 * * @return An error code - * @param[out] value A @c double value - * @exception E_SUCCESS The method is successful. + * @param[out] value The @c double value + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current instance is not a square matrix. */ result GetTrace(double& value) const; @@ -271,9 +275,9 @@ public: * * @since 2.0 * - * @return A pointer to the instance of %DoubleMatrix containing the resulting value of the operation - * @exception E_INVALID_OPERATION The current instance is not a square matrix. - * @remarks The specific error code can be accessed using the GetLastResult() method. + * @return A pointer to the %DoubleMatrix instance that contains the resulting value of the operation + * @exception E_INVALID_OPERATION The current instance is not a square matrix. + * @remarks The specific error code can be accessed using the GetLastResult() method. */ DoubleMatrix* GetTransposeN(void) const; @@ -282,8 +286,8 @@ public: * * @since 2.0 * - * @return @c true if the matrix is an identity matrix, @n - * else @c false + * @return @c true if the matrix is an identity matrix, @n + * else @c false */ bool IsIdentity(void) const; @@ -292,8 +296,8 @@ public: * * @since 2.0 * - * @return @c true if the matrix is invertible, @n - * else @c false + * @return @c true if the matrix is invertible, @n + * else @c false */ bool IsInvertible(void) const; @@ -303,18 +307,18 @@ public: * @since 2.0 * * @return An error code - * @param[in] matrix An instance of %DoubleMatrix - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The column count of the current instance is not same with the row count of the specified instance. + * @param[in] matrix An instance of %DoubleMatrix + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The column count of the current instance is not same as the row count of the specified instance. */ result Multiply(const DoubleMatrix& matrix); /** - * Multiplies the value with each matrix members of the current instance of %DoubleMatrix. + * Multiplies the value with each matrix member of the current instance of %DoubleMatrix. * * @since 2.0 * - * @param[in] value A @c double value to multiply + * @param[in] value The @c double value to multiply */ void Multiply(double value); @@ -331,7 +335,7 @@ public: * @since 2.0 * * @return An error code - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current instance is not a square matrix. */ result SetAsIdentity(void); @@ -342,7 +346,7 @@ public: * @since 2.0 * * @return An error code - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current instance is not a square matrix. */ result Invert(void); @@ -353,7 +357,7 @@ public: * @since 2.0 * * @return An error code - * @exception E_SUCCESS The method is successful. + * @exception E_SUCCESS The method is successful. * @exception E_INVALID_OPERATION The current instance is not a square matrix. */ result Transpose(void); @@ -364,10 +368,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] columnIndex The target column number in the current instance - * @param[in] pArray An array which includes the values @n The array must be at least row in length. - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The @c pArray is @c null, or the @c columnIndex is larger than the column count of the current instance. + * @param[in] columnIndex The target column number in the current instance + * @param[in] pArray The array which includes the values @n + * The array must be at least row in length. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c pArray is @c null. + * - The specified @c columnIndex is larger than the column count of the current instance. */ result SetColumn(int columnIndex, const double* pArray); @@ -377,10 +384,13 @@ public: * @since 2.0 * * @return An error code - * @param[in] rowIndex The target row number in the current instance - * @param[in] pArray An array which includes the values @n The array must be at least column in length. - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The @c pArray is @c null, or the @c rowIndex is larger than the row count of the current instance. + * @param[in] rowIndex The target row number in the current instance + * @param[in] pArray The array which includes the values @n + * The array must be at least column in length. + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c pArray is @c null. + * - The specified @c rowIndex is larger than the row count of the current instance. */ result SetRow(int rowIndex, const double* pArray); @@ -390,31 +400,34 @@ public: * @since 2.0 * * @return An error code - * @param[in] rowIndex The target row number in the current instance - * @param[in] columnIndex The target column number in the current instance - * @param[in] value A @c double value - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The pArray is @c null, or the @c rowIndex is larger than the row count of the current instance, - * or the @c columnIndex is larger than the column count of the current instance. + * @param[in] rowIndex The target row number in the current instance + * @param[in] columnIndex The target column number in the current instance + * @param[in] value The @c double value + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either of the following conditions has occurred: + * - The specified @c pArray is @c null. + * - The specified @c rowIndex is larger than the row count of the current instance. + * - The specified @c columnIndex is larger than the column count of the current instance. */ result SetElement(int rowIndex, int columnIndex, double value); /** - * Sets the values to the current instance of %DoubleMatrix in either the row-major or column-major order. + * Sets the values to the current instance of %DoubleMatrix in either the row-major or the column-major order. * * @since 2.0 * * @return An error code - * @param[in] pArray A one-dimensional array @n The array must be at least row * column in length. - * @param[in] rowMajor Set to @c true to copy the array in row-major order, @n - * else @c copy in column-major order - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG The @c pArray is @c null. + * @param[in] pArray The one-dimensional array @n + * The array must be at least row * column in length. + * @param[in] rowMajor Set to @c true to copy the array in row-major order, @n + * else @c copy in column-major order + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG The specified @c pArray is @c null. */ result SetValue(const double* pArray, bool rowMajor = true); /** - * Sets the matrix members of current instance of %DoubleMatrix to zero. + * Sets the matrix members of the current instance of %DoubleMatrix to zero. * * @since 2.0 */ @@ -426,18 +439,18 @@ public: * @since 2.0 * * @return An error code - * @param[in] matrix An instance of %DoubleMatrix - * @exception E_SUCCESS The method is successful. - * @exception E_INVALID_ARG Either row or column count of the current instance is not same with that of the specified instance. + * @param[in] matrix An instance of %DoubleMatrix + * @exception E_SUCCESS The method is successful. + * @exception E_INVALID_ARG Either the row or the column count of the current instance is not same as that of the specified instance. */ result Subtract(const DoubleMatrix& matrix); /** - * Subtracts the value from each matrix members of the current instance of %DoubleMatrix. + * Subtracts the value from each matrix member of the current instance of %DoubleMatrix. * * @since 2.0 * - * @param[in] value A @c double value to subtract + * @param[in] value The @c double value to subtract */ void SubtractToEachElement(double value); @@ -461,7 +474,5 @@ private: int __column; }; // DoubleMatrix - }} // Tizen::Base - #endif //_FBASE_DOUBLE_MATRIX_H_