Matrix operation method, electronic device, and computer program product
By performing gesture operations on the electronic display unit, efficient and intuitive configuration changes of multiple components within the matrix are achieved, solving the problem of unintuitive user operation in the prior art and simplifying the rotation, cyclic shift, and transpose operations of matrix components.
Patent Information
- Application Number
- CN202211569532.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-12-10
- Filing Date
- 2022-12-08
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2042-12-08
AI Technical Summary
In existing electronic computing devices and applications, users cannot intuitively change the configuration of multiple components within a matrix at once, such as rotation, shifting, and transposition.
By performing gesture operations on the display unit, the configuration changes of multiple components within the matrix can be realized, including rotation, cyclic shift, and transpose. The touch panel detects the user's gestures, and the control unit executes the corresponding matrix operation processing.
It enables efficient and intuitive movement of matrix components, allowing users to rotate, cyclically shift, and transpose components within a matrix in a single operation, simplifying the operation process.
Smart Images

Figure CN116257167B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to a matrix operation method, an electronic device, and a program. BACKGROUND
[0002] Conventionally, in electronic computing devices, there are electronic computing devices that have a matrix computing function of inputting a matrix and performing a calculation in addition to a general four arithmetic function.
[0003] Further, there are known devices that can perform basic transformation of a matrix (row operation column operation). For example, in Japanese Patent Application Publication No. 2012-243015, a device is described that displays a list of row operation functions related to a matrix together with the matrix, selects an expression required to execute a row operation function touched from the list, and inputs a numerical value, thereby performing a row operation.
[0004] Further, in recent years, there are function calculator Web applications and function calculator applications that operate on devices that can perform a touch operation. SUMMARY
[0005] PROBLEMS TO BE SOLVED BY THE INVENTION
[0006] However, in the conventional electronic computing devices, applications, and Web applications, a user cannot perform a movement of a height of a matrix component (for example, a rotation movement, a circular shift, a transposition, or the like) that changes a configuration of a plurality of components in a matrix at once by an intuitive operation.
[0007] The present disclosure was completed in view of the above-described problems, and aims to enable a movement of a height of a matrix component by an intuitive operation.
[0008] MEANS FOR SOLVING THE PROBLEMS
[0009] The matrix operation method of the present disclosure is a method in which a computer displays a matrix in which a plurality of components are arranged on a display section, and changes a configuration of the plurality of components in the matrix based on a gesture operation with respect to the matrix displayed on the display section.
[0010] EFFECTS OF THE INVENTION
[0011] According to the present disclosure, a movement of a height of a matrix component can be performed by an intuitive operation. BRIEF DESCRIPTION OF DRAWINGS
[0012] Figure 1 is a block diagram that shows a configuration of a function of an electronic device of the present embodiment.
[0013] Figure 2 is a diagram that schematically shows a rotation operation.
[0014] Figure 3is a diagram showing an example of rotating a 2-row 3-column matrix clockwise by 90°
[0015] Figure 4 is a diagram schematically showing a circular shift operation of a row.
[0016] Figure 5 is a diagram schematically showing a circular shift operation of a column.
[0017] Figure 6A is a diagram schematically showing a transposition operation.
[0018] Figure 6B is a diagram schematically showing a transposition operation.
[0019] Figure 7 is a flowchart showing a flow of a matrix operation process performed by a control section of Figure 1 .
[0020] Figure 8 is a flowchart showing a flow of a circular shift process of a row performed by a control section of Figure 1 .
[0021] Figure 9 is a flowchart showing a flow of a circular shift process of a column performed by a control section of Figure 1 .
[0022] Figure 10 is a flowchart showing a flow of a transposition process performed by a control section of Figure 1 .
[0023] Figure 11 is a flowchart showing a flow of a rotation process performed by a control section of Figure 1 .
[0024] Figure 12 is a diagram showing a manner in which an electronic device is connected to a Web server via a communication network such as the Internet.
[0025] Figure 13 is a block diagram showing a configuration of a function of a Web server of Figure 12 . DETAILED DESCRIPTION
[0026] Hereinafter, the present embodiment will be described using the drawings. However, in the following described embodiment, various limitations that are technically preferable in order to implement the present disclosure are added. Therefore, the scope of the technology of the present disclosure is not limited to the following embodiment and the illustrated example.
[0027] [Configuration of Electronic Device 100]
[0028] First, the configuration of the electronic device 100 of the present embodiment will be described.
[0029] Figure 1 is a block diagram showing the configuration of the function of the electronic device 100 of the present embodiment. The electronic device 100 can be constituted by, for example, a tablet terminal, a smartphone, a PC (Personal Computer), or the like on which a function calculator application (referred to as a function calculator application) 121 is mounted, or can be constituted by a device dedicated to calculation, and the mode thereof is not particularly limited.
[0030] Figure 1 As shown, the electronic device 100 is constituted by a control section 11, a storage section 12, an operation section 13, a display section 14, a communication section 15, and the like, and the respective sections are connected by a bus 16.
[0031] The control section 11 is constituted by a CPU (Central Processing Unit), a ROM (ReadOnly Memory), a RAM (Random Access Memory), and the like. The CPU of the control section 11 reads out a program and data stored in the ROM and the storage section 12, uses the RAM as a work area to execute various processes, and thereby performs centralized control of the respective sections of the electronic device 100.
[0032] The storage section 12 is constituted by a nonvolatile semiconductor memory, a hard disk, or the like, and stores various programs and data used in the programs, and the like.
[0033] In the present embodiment, the function calculator application 121 is stored in the storage section 12. The function calculator application 121 is an application program for the control section 11 to execute various processes related to calculation including a matrix operation process described later.
[0034] The operation section 13 is provided with a touch panel 131 formed so as to overlap the screen of the display section 14. The operation section 13 can also be provided with various operation buttons, detect the operation of the operation buttons, the operation on the screen of the display section 14, and output operation information thereof to the control section 11.
[0035] The display section 14 is constituted by an LCD (Liquid Crystal Display), an EL (Electro Luminescence) display, or the like, and performs various displays in accordance with display information instructed from the control section 11.
[0036] The communication section 15 performs communication control for communication with an external device via a communication network such as a LAN (Local Area Network), the Internet, or the like.
[0037] [Action of the Electronic Device 100]
[0038] Next, the operation of electronic device 100 will be explained.
[0039] In the electronic device 100, when the operation unit 13 detects the start operation of the function calculator application 121, the control unit 11 starts the function calculator application 121 and performs the following processing in cooperation with the function calculator application 121.
[0040] For example, when the function calculator application 121 is launched by the user operation on the operation unit 13, the control unit 11 displays the input screen on the display unit 14. When a matrix input instruction is detected via the touch panel 131 and the components of the matrix are input, the control unit 11 causes the display unit 14 to display the matrix. When an input containing a matrix expression is detected via the touch panel 131 and execution is instructed, the control unit 11 performs calculation processing based on the input and displays the calculation result on the display unit 14.
[0041] Here, a matrix refers to a matrix composed of multiple components (elements).
[0042] In the electronic device 100 of this embodiment, the arrangement of multiple components displayed on the display unit 14 can be changed all at once through a user's gesture operation on the matrix. For example, through the user's gesture operation on the matrix, rotation, cyclic shift, transpose, etc., of the components of the matrix can be performed. The user's gesture operation for rotating the position of each component of the matrix is called a rotation operation. The user's gesture operation for cyclically shifting the components of a certain row or column of the matrix (hereinafter referred to as "cyclic shift") is called a cyclic shift operation. The user's gesture operation for transposing the components of a row and column of the matrix by exchanging the components of the row and column (hereinafter referred to as "transpose movement") is called a transpose operation.
[0043] (Rotation operation)
[0044] For example, when the display unit 14 displays a matrix, the control unit 11, as Figure 2 As shown, an effective range R1 for starting a rotation operation on the displayed matrix is defined around the matrix. In this embodiment, the defined range around the matrix (excluding the matrix itself), for example, is the distance between elements from the outer perimeter of the matrix (e.g., the quadrilateral formed by the line segments connecting the rightmost, top-leftmost, bottom-leftmost, and bottom-rightmost points in the matrix containing brackets). Figure 4 , 5The range until the position where the user touches the display screen (the row distance dRow or the column distance dCol) is set as the effective range Rl of the rotation operation start. Further, the center point of the displayed matrix is set as the matrix center point PO. In one embodiment, the area obtained by removing the effective range of the rotation operation start described later from the prescribed range from the periphery of the matrix (not including the matrix) is set as the effective range of the rotation operation start.
[0045] In a case where the touch panel 131 detects that the user touches (touches) within the effective range Rl of the rotation operation start, the control section 11 acquires the touched position (coordinates) as the gesture start point PI.
[0046] In a case where the touch panel 131 detects that the user rotates and slides the finger (touch position) from the gesture start point PI clockwise or counterclockwise with the matrix center point PO as the center, the control section 11 acquires the rotation angle (counterclockwise is positive and clockwise is negative) until the current time, and displays the matrix of the operation object rotated by the prescribed angle according to the rotation angle, as shown in FIG. 6. Figure 2 As shown in FIG. 6, the control section 11 rotates and moves the position of each component of the matrix of the operation object by the prescribed angle according to the rotation angle θ and displays it on the display section 14.
[0047] In a case where the touch panel 131 detects that the user separates the finger from the screen to perform the touch-off (release of the touch), the control section 11 acquires the position (coordinates) of the touch-off as the gesture end point P2, and acquires the angle formed by the gesture start point PI, the matrix center point PO, and the gesture end point P2 as the rotation angle θ (counterclockwise is positive and clockwise is negative). Further, the control section 11 rotates and moves the position of each component of the matrix of the operation object by the prescribed angle according to the rotation angle θ and displays it on the display section 14, as shown in FIG. 7. Figure 2 As shown in FIG. 7, the control section 11 rotates and moves the position of each component of the matrix of the operation object by the prescribed angle according to the rotation angle θ and displays it on the display section 14.
[0048] For example, the control section 11 rotates and moves each component of the matrix according to the rotation angle θ in the following manner.
[0049] 0° < θ ≤ 45°: no rotation
[0050] 45° < θ ≤ 135°: counterclockwise rotation by 90°
[0051] 135° < θ ≤ 225°: counterclockwise rotation by 180°
[0052] 225° < θ ≤ 315°: counterclockwise rotation by 270°
[0053] 315°<θ≤360°: Rotate 360° counterclockwise (i.e., do not rotate).
[0054] 0°<θ≤-45°: No rotation
[0055] -45°<θ≤-135°: Rotate 90° clockwise
[0056] -135°<θ≤-225°: Rotate 180° clockwise
[0057] -225°<θ≤-315°: Rotate 270° clockwise
[0058] -315°<θ≤-360°: Rotate 360° clockwise (i.e., do not rotate).
[0059] Furthermore, when θ is greater than 360°, the rotation is performed in the same manner as when the remainder of θ is obtained by dividing θ by 360. When θ is less than -360°, the rotation is performed in the same manner as when the remainder of -θ divided by 360 is multiplied by -1 to obtain θ.
[0060] Figure 3 An example of a matrix depicted on display unit 14 is shown where the user touches the matrix within the effective range of a 2x3 matrix rotation operation and performs a rotation operation that rotates the touch position 90° clockwise before the touch is released.
[0061] Thus, in the rotation operation, by touching the area around the matrix and sliding along the rotation direction centered on the matrix's center point P0, the positions of multiple components within the matrix can be rotated and moved in a single operation. Therefore, without needing to operate on icons, function buttons, menus, etc., the matrix components can be rotated and moved quickly through intuitive operation.
[0062] (Cyclic shift operation)
[0063] For example, when the display unit 14 displays a matrix, the control unit 11, as Figure 4 , Figure 5 As shown by the dashed line, the valid range for starting the cyclic shift operation for each row and column is set within the displayed matrix. Figure 4 , 5 In the examples shown, for instance, R11 to R16.
[0064] In the present embodiment, the cyclic shift of a row in the matrix means shifting the components of a certain row in the matrix to the horizontal direction (right or left) and moving the components overflowing from the empty part. For example, in the case where the components of a certain row are (1, 2, 3), if the row is cyclically shifted to the right by 1, the components of the row become (3, 1, 2). If the row is cyclically shifted to the right by 2, the components of the row become (2, 3, 1).
[0065] Further, the cyclic shift of a column in the matrix means shifting the components of a certain column in the matrix to the vertical direction (up or down) and moving the components overflowing from the empty part. For example, in the case where the components of a certain column are (1, 2, 3) from the top, if the column is cyclically shifted down by 1, the components of the column become (3, 1, 2) from the top. If the column is cyclically shifted down by 2, the components of the column become (2, 3, 1) from the top.
[0066] In the present embodiment, the area in the matrix that surrounds the components of each row (for example, R11 to R13 of Figure 4 is set as the effective range where the cyclic shift operation for each row starts. For example, the outer periphery of the effective range in the part between the 1st row and the 2nd row is the inside of the area that surrounds the components of each row and is surrounded by the brackets of the matrix, and is set so as not to overlap with the effective range of the other rows. Further, the area in the matrix that surrounds the components of each column (for example, R14 to R16 of Figure 5 is set as the effective range where the cyclic shift operation for each column starts. For example, the outer periphery of the effective range in the part between the 1st column and the 2nd column is the inside of the area that surrounds the components of each column and is surrounded by the brackets of the matrix, and is set so as not to overlap with the effective range of the other columns. Further, the outer periphery of the effective range in the part between the 1st column and the 2nd column is the inside of the area that surrounds the components of each column and is surrounded by the brackets of the matrix, and is set so as not to overlap with the effective range of the other columns. For example, the outer periphery of the effective range in the part between the 1st column and the 2nd column is the inside of 1 / 2 dCol.
[0067] In the case where the user touches the effective range where the cyclic shift operation of a certain row or column starts is detected by the touch panel 131, the control section 11 acquires the touch position (coordinates) of the touch as the gesture start point P1.
[0068] As Figure 4As shown, in a case where the finger (touch position) is slid (moved) horizontally from the gesture start point Pl by the touch panel 131, the control section 11 acquires the distance of the horizontal sliding (horizontal sliding distance sRow) and the sliding direction (right or left), and causes the components of the row of the matrix of the operation object which is subjected to the horizontal sliding operation to be circularly shifted and displayed on the display section 14 in accordance with the horizontal sliding distance sRow and the sliding direction. Thereby, the user can easily grasp how the circular shift of the row is performed by the horizontal sliding of the touch position at the current time.
[0069] In a case where the user performs the touch-off by lifting the finger from the screen by the touch panel 131, the control section 11 acquires the position (coordinates) of the touch-off as the gesture end point P2. Also, in accordance with the horizontal sliding distance sRow and the sliding direction between the gesture start point Pl and the gesture end point P2, as shown, the components of the row of the matrix of the operation object which is subjected to the horizontal sliding operation are circularly shifted by a prescribed shift amount in a prescribed direction and displayed on the display section 14. Figure 4
[0070] For example, the control section 11 circularly shifts each component of the row of the matrix of the operation object which is subjected to the operation in accordance with the horizontal sliding distance sRow and the sliding direction in the following manner. Here, let the column distance of the components of the matrix be dCol and the number of columns of the matrix be N. Whether the sliding is to the right or to the left is determined by the sliding direction of the touch position.
[0071] 0 < sRow < 0.5 * dCol: no sliding
[0072] 0.5 * dCol < sRow < 1.5 * dCol: sliding 1 column to the right or left
[0073] 1.5 * dCol < sRow < 2.5 * dCol: sliding 2 columns to the right or left
[0074] ...
[0075] (n - 0.5) * dCol < sRow < (n + 0.5) * dCol: sliding n columns to the right or left
[0076] ...
[0077] (N - 1.5) * dCol < sRow < (N - 0.5) * dCol: sliding N - 1 columns to the right or left
[0078] (N - 0.5) * dCol < sRow: sliding N - 1 columns to the right or left (up to sliding of the maximum N - 1 columns)
[0079] Further, as shown in FIG. 9, in a case where the user performs the touch-off by lifting the finger from the screen by the touch panel 131, the control section 11 acquires the position (coordinates) of the touch-off as the gesture end point P2. Also, in accordance with the horizontal sliding distance sRow and the sliding direction between the gesture start point Pl and the gesture end point P2, as shown, the components of the row of the matrix of the operation object which is subjected to the horizontal sliding operation are circularly shifted by a prescribed shift amount in a prescribed direction and displayed on the display section 14. Figure 5 As illustrated, in a case where the finger (touch position) is detected by the touch panel 131 to be slid (moved) in the vertical direction from the gesture start point Pl, the control section 11 acquires the distance of the vertical sliding (vertical sliding distance sCol) and the sliding direction (up or down), and causes the components of the column of the operation object in the matrix displayed on the display section 14 to be vertically slid to be circularly shifted and displayed on the display section 14 in accordance with the vertical sliding distance sCol and the sliding direction. Thereby, the user can easily grasp how the circular shift of the column is performed by the vertical sliding of the touch position at the current time.
[0080] In a case where the user is detected by the touch panel 131 to lift the finger from the screen to perform touch-off, the control section 11 acquires the position (coordinates) of the touch-off as the gesture end point P2. Also, in accordance with the vertical sliding distance sCol and the sliding direction between the gesture start point Pl and the gesture end point P2, the components of the column of the operation object in the matrix that are vertically slid are circularly shifted by a prescribed shift amount in a prescribed direction and displayed on the display section 14.
[0081] For example, the control section 11 circularly shifts the components of the column of the operation object in the matrix that are operated in accordance with the vertical sliding distance sCol in the following manner. Here, let the distance between the rows of the components of the matrix be dRow, and the number of rows of the matrix be M. Whether the sliding is up or down is determined by the sliding direction.
[0082] 0 < sCol < 0.5 * dRow: no sliding
[0083] 0.5 * dRow ≤ sCol < 1.5 * dRow: sliding up or down by 1 row
[0084] 1.5 * dRow ≤ sCol < 2.5 * dRow: sliding up or down by 2 rows
[0085] ...
[0086] (m - 0.5) * dRow ≤ sCol < (m + 0.5) * dRow: sliding up or down by m rows
[0087] ...
[0088] (M - 1.5) * dRow ≤ sCol < (M - 0.5) * dRow: sliding up or down by M - 1 row
[0089] (M - 0.5) * dRow ≤ sCol: sliding up or down by M - 1 row (up to sliding by the maximum of M - 1 rows)
[0090] Thus, in the cyclic shift operation, by touching the row or column to be cyclically shifted in the matrix and sliding it horizontally or vertically, the positions of multiple components in the matrix can be cyclically shifted in one operation. Therefore, without operating on icons, function buttons, menus, etc., the cyclic shift of matrix components can be performed quickly through intuitive operation.
[0091] (Transpose operation)
[0092] For example, when the display unit 14 displays a matrix, the control unit 11, as Figure 6A , Figure 6B As shown, for example, regions R21 and R22 of a predetermined size located in the upper right and lower left parts of the displayed matrix (in this embodiment, triangular regions outside the matrix) are set as the effective range for the transpose operation of the matrix. Furthermore, the diagonal of the matrix (the line segment passing through the diagonal components; in this embodiment, the line segment connecting the upper left and lower right of the matrix) is set as the transpose boundary line L1.
[0093] For example, in this embodiment, regions R21 and R22 are adjacent to the upper right and lower left corners of the brackets of the matrix. In one embodiment, regions R21 and R22 may also be adjacent to the corner components of the matrix. In this embodiment, region R21 (or region R22) is a triangle with a base consisting of a straight line passing through the upper right (or lower left) corner of the brackets of the matrix and approximately parallel to the transpose boundary line L1. For example, when the length of each side of the triangle is t, t can be set to...
[0094] 0.5*dCol≤t<1*dCol
[0095] In this embodiment, the size of the regions R21 and R22 is smaller than the size of the matrix (the size that appears on the display) and the size of the effective range R1. The regions R21 and R22 are located inside the outer periphery of the effective range R1.
[0096] In one implementation, regions R21 and R22 can also be located in the upper left and lower right parts of the displayed matrix. For example, they can be adjacent to the upper left and lower right corners of the matrix's brackets, or they can be adjacent to the components of the upper left and lower right corners. In this case, the transpose boundary line L1 can also be set as the line segment connecting the upper right and lower left of the matrix.
[0097] If the touch panel 131 detects that a touch has occurred within the effective range R21 or R22 where the transpose operation begins, the control unit 11 obtains the touch position (coordinates) as the gesture start point P1.
[0098] In a case where the user slides the finger (touch position) in the oblique direction from the gesture start point Pl detected by the touch panel 131 from the upper right portion, the control section 11 judges whether the touch position after the movement has crossed the transposition boundary line LI, and in a case where it is judged that it has crossed, changes the shape of the matrix as a whole of the operation object displayed by the display section 14. For example, as shown in Figs. 17A and 17B, in a case where the touch position after the movement has crossed the transposition boundary line LI, the matrix as a whole is deformed into an oblique (parallelogram shape) in a manner that the user can recognize that it has crossed. Thereby, the user can easily grasp whether the touch position has crossed the transposition boundary line LI. Figure 6A 、 Figure 6B
[0099] In a case where the user performs touch-off by lifting the finger from the screen, which is detected by the touch panel 131, the control section 11 acquires the position (coordinates) of the touch-off as the gesture end point P2, and judges whether the touch position has been moved by crossing (striding over) the transposition boundary line LI, based on the coordinates of the gesture start point Pl and the gesture end point P2. In a case where it is judged that the touch position has been moved by crossing the transposition boundary line LI, the control section 11 creates a transposed matrix by exchanging the components of the rows and the components of the columns of the matrix of the operation object, and causes it to be displayed on the display section 14. Specifically, (i, j) components and (j, i) components are exchanged.
[0100] Thus, in the transposition operation, by the gesture operation of touching the upper right portion or the lower left portion in the matrix and sliding in the oblique direction until crossing the transposition boundary line LI, the positions of a plurality of components in the matrix can be transposed by one operation, and therefore, the transposition of the matrix components can be performed quickly by an intuitive operation without operating icons, function buttons, menus, and the like.
[0101] (Matrix operation processing)
[0102] Figure 7 is a flowchart showing a flow of the matrix operation processing executed by the control section 11 when a touch (touching) is detected by the touch panel 131 during the display of the matrix on the display section 14. The matrix operation processing is executed by the cooperation of the control section 11 and the function calculator application 121 stored in the storage section 12.
[0103] First, the control section 11 judges whether the touch position at which a touch (touching) is detected by the touch panel 131 is within the effective range for the start of the gesture operation with respect to the matrix (step Sl).
[0104] The effective range for the start of the gesture operation includes the effective ranges for the respective rotation operation, the circular shift operation, and the transposition operation.
[0105] When it is determined that the gesture operation is started in the valid range for the matrix (step S1; Yes), the control section 11 stores the coordinates of the touch position as a gesture start point in the RAM (step S2).
[0106] Next, the control section 11 determines whether the gesture start point P1 is within the area of the matrix displayed on the display section 14 (step S3).
[0107] When it is determined that the gesture start point P1 is within the area of the matrix displayed on the display section 14 (step S3; Yes), the control section 11 determines whether a slide (movement) of the touch position is detected by the touch panel 131 (step S4).
[0108] When it is determined that the slide of the touch position is not detected (step S4; No), the control section 11 determines whether a touch-off is detected by the touch panel 131 (step S7).
[0109] When it is determined that the touch-off is not detected (step S7; No), the control section 11 returns to step S4.
[0110] When it is determined that the touch-off is detected (step S7; Yes), the control section 11 ends the matrix operation processing.
[0111] On the other hand, when it is determined that the slide (movement) of the touch position is detected by the touch panel 131 (step S4; Yes), the control section 11 determines whether the slide direction is horizontal (step S5).
[0112] When it is determined that the slide direction is horizontal (step S5; Yes), the control section 11 performs the row cyclic shift processing (step S6).
[0113] Figure 8 is a flowchart of the flow of the row cyclic shift processing performed in step S6 of Figure 7 The row cyclic shift processing is performed by the control section 11 in cooperation with the function calculator application 121.
[0114] In the row cyclic shift processing, the control section 11 calculates the distance of the horizontal slide of the touch position (horizontal slide distance sRow) and the slide direction (right or left) (step S61), and causes the components of the row that becomes the operation target of the matrix of the operation object displayed on the display section 14 to be cyclically shifted by a prescribed shift amount in a prescribed direction based on the horizontal slide distance sRow and the slide direction, and displays the matrix on the display section 14 (step S62).
[0115] As to how much the components of the row that becomes the operation target are cyclically shifted in which direction based on the slide distance sRow and the slide direction, as described above.
[0116] Next, the control section 11 determines whether or not the touch-off is detected by the touch panel 131 (step S63).
[0117] In a case where it is determined that the touch-off is not detected by the touch panel 131 (step S63; No), the control section 11 determines whether or not the sliding of the touch position is detected by the touch panel 131 (step S64).
[0118] In a case where it is determined that the sliding of the touch position is detected (step S64; Yes), the control section 11 returns to step S61.
[0119] In a case where it is determined that the sliding of the touch position is not detected (step S64; No), the control section 11 returns to step S63.
[0120] On the other hand, in a case where it is determined that the touch-off is detected by the touch panel 131 (step S63; Yes), the control section 11 acquires the coordinates of the position of the touch-off as the gesture end point P2, calculates the horizontal sliding distance sRow and the sliding direction between the gesture start point PI and the gesture end point P2 (step S65). Further, the control section 11 causes the components of the matrix of the operation object which are the rows of the operation object to be circularly shifted by a prescribed shift amount in a prescribed direction based on the horizontal sliding distance sRow and the sliding direction, and displays the matrix on the display section 14 (step S66), and ends the matrix operation processing.
[0121] As to in which direction and by how much the components of the rows of the operation object are circularly shifted based on the sliding distance sRow and the sliding direction, as described above.
[0122] Further, in a case where the matrix of the operation object is a matrix included in an expression, the control section 11 further performs re-computation of the expression using the circularly shifted matrix, and causes the re-computation result to be displayed on the display section 14.
[0123] In step S5 of Figure 7 In a case where it is determined that the sliding direction of the touch position is not horizontal (step S5; No), it is determined whether or not the sliding direction of the touch position is vertical (step S8). In a case where it is determined that the sliding direction of the touch position is vertical (step S8; Yes), the control section 11 performs the circular shift processing of the columns (step S9).
[0124] In a case where it is determined that the sliding direction of the touch position is not vertical (step S8; No), the control section 11 ends the matrix operation processing.
[0125] Figure 9 is a flowchart showing the flow of the circular shift processing of the columns performed in step S9 of Figure 7 The circular shift processing of the rows is performed by the control section 11 in cooperation with the function calculator application 121.
[0126] In the column cyclic shift processing, the control section 11 calculates the distance by which the touch position is slid in the vertical direction (vertical slide distance sCol) and the slide direction (up or down) (step S91), and causes the components of the column that becomes the operation target in the matrix of the operation object displayed on the display section 14 to be cyclically shifted by a prescribed shift amount in a prescribed direction based on the vertical slide distance sCol and the slide direction, and displays the same on the display section 14 (step S92).
[0127] As to how much the components of the column that becomes the operation target are cyclically shifted in which direction based on the vertical slide distance sCol and the slide direction, the same as described above applies.
[0128] Next, the control section 11 determines whether or not the touch-off is detected by the touch panel 131 (step S93).
[0129] In the case where it is determined that the touch-off is not detected by the touch panel 131 (step S93; No), the control section 11 determines whether or not the slide of the touch position is detected by the touch panel 131 (step S94).
[0130] In the case where it is determined that the slide of the touch position is detected (step S94; Yes), the control section 11 returns to step S91.
[0131] In the case where it is determined that the slide of the touch position is not detected (step S94; No), the control section 11 returns to step S93.
[0132] On the other hand, in the case where it is determined that the touch-off is detected by the touch panel 131 (step S93; Yes), the control section 11 acquires the coordinates of the position at which the touch-off is performed as the gesture end point P2, calculates the vertical slide distance sCol and the slide direction between the gesture start point PI and the gesture end point P2 (step S95). Further, the control section 11 causes the components of the column that becomes the operation target in the matrix of the operation object displayed on the display section 14 to be cyclically shifted by a prescribed shift amount in a prescribed direction based on the vertical slide distance sCol and the slide direction, and determines the display (step S96), and ends the matrix operation processing.
[0133] As to how much the components of the column that becomes the operation target are cyclically shifted in which direction based on the vertical slide distance sCol and the slide direction, the same as described above applies.
[0134] Further, in the case where the matrix that becomes the operation target is a matrix included in an expression, the control section 11 further performs re-computation of the expression using the cyclically shifted matrix, and causes the re-computation result to be displayed on the display section 14.
[0135] In the case where the matrix that becomes the operation target is a matrix included in an expression, the control section 11 further performs re-computation of the expression using the cyclically shifted matrix, and causes the re-computation result to be displayed on the display section 14. Figure 7In step S3, in a case where it is determined that the gesture start point P1 is not within the region of the matrix displayed on the display section 14 (step S3; No), the control section 11 determines whether the gesture start point P1 is within the effective range of the transpose operation set in the upper right or lower left of the matrix (R21 or R22 of FIG. 6) (step S10).
[0136] In one embodiment, the effective range of the transpose operation can also be set in the upper left or lower right of the matrix. In this case, in step S10, the control section 11 determines whether the gesture start point P1 is within the effective range of the transpose operation set in the upper left or lower right of the matrix.
[0137] In a case where it is determined that the gesture start point P1 is within the effective range of the transpose operation (step S10; Yes), the control section 11 determines whether a slide of the touch position is detected by the touch panel 131 (step S11).
[0138] In a case where it is determined that a slide of the touch position is not detected by the touch panel 131 (step S11; No), the control section 11 determines whether a touch-off is detected by the touch panel 131 (step S14).
[0139] In a case where it is determined that a touch-off is not detected (step S14; No), the control section 11 returns to step S11.
[0140] In a case where it is determined that a touch-off is detected (step S14; Yes), the control section 11 ends the matrix operation processing.
[0141] On the other hand, in a case where it is determined that a slide of the touch position is detected by the touch panel 131 (step S11; Yes), the control section 11 determines whether the slide direction of the touch position is a tilt direction (step S12).
[0142] In a case where it is determined that the slide direction of the touch position is the tilt direction (step S12; Yes), the control section 11 executes the transpose processing (step S13).
[0143] In a case where it is determined that the slide direction of the touch position is not the tilt direction (step S12; No), the control section 11 ends the matrix operation processing.
[0144] Figure 10 is a flowchart of the flow of the transpose processing executed in step S13. Figure 7
[0145] In the transposition processing, the control section 11 judges whether the touch position after the sliding has crossed the transposition boundary line Ll (step S131), and causes the matrix of the operation object to be displayed on the display section 14 in a shape corresponding to the judgment result (step S132).
[0146] For example, as shown in Fig. 6, in the case where the touch position after the sliding has crossed the transposition boundary line Ll, the matrix is caused to be displayed on the display section 14 in a manner that the user can recognize that this case has been crossed, by being deformed as a whole into an inclined shape (parallelogram shape). In the case where the touch position after the sliding has not crossed the transposition boundary line Ll, the matrix is caused to be displayed on the display section 14 without being changed in shape, in a manner that the user can recognize that this case has not been crossed.
[0147] Next, the control section 11 judges whether the touch-off has been detected by the touch panel 131 (step S133).
[0148] In the case where it is judged that the touch-off has not been detected by the touch panel 131 (step S133; No), the control section 11 judges whether the sliding of the touch position has been detected by the touch panel 131 (step S134).
[0149] In the case where it is judged that the sliding of the touch position has been detected (step S134; Yes), the control section 11 returns to step S131.
[0150] In the case where it is judged that the sliding of the touch position has not been detected (step S134; No), the control section 11 returns to step S133.
[0151] On the other hand, in the case where it is judged that the touch-off has been detected by the touch panel 131 (step S133; Yes), the control section 11 acquires the coordinates of the position at which the touch-off has been made as the gesture end point P2, judges whether the touch position has crossed the transposition boundary line Ll on the basis of the coordinates of the gesture start point Pl and the gesture end point P2 (step S135).
[0152] In the case where it is judged that the touch position has not crossed the transposition boundary line Ll (step S135; No), the control section 11 causes the matrix before the transposition operation to be displayed on the display section 14 (step S137), and ends the transposition processing.
[0153] In the case where it is judged that the touch position has crossed the transposition boundary line Ll (step S135; Yes), the control section 11 causes the components of the rows and the components of the columns of the matrix of the operation object to be exchanged to generate a transposed matrix, and causes it to be displayed on the display section 14 (step S136), and ends the transposition processing.
[0154] In addition, in the case where the matrix that becomes the operation object is a matrix included in an expression, the control section 11 further performs re-computation of the expression using the transposed matrix, and causes the re-computation result to be displayed on the display section 14.
[0155] On the other hand, Figure 7 In step S10, if it is determined that the gesture start point P1 is not within the effective range of the transpose operation (step S10; no), the control unit 11 determines whether the touch panel 131 has detected a sliding of the touch position (step S15).
[0156] If it is determined that no sliding at the touch position is detected by the touch panel 131 (step S15; no), the control unit 11 determines whether the touch panel 131 has detected a touch-off (step S18).
[0157] If it is determined that no contact was detected (step S18; no), the control unit 11 returns to step S15.
[0158] If it is determined that a touch-out has been detected (step S18; Yes), the control unit 11 ends the matrix operation process.
[0159] On the other hand, if it is determined that a sliding of the touch position is detected by the touch panel 131 (step S15; yes), the control unit 11 determines whether the sliding direction of the touch position is a rotational direction centered on the matrix center point P0 (step S16).
[0160] If the sliding direction of the touch position is determined to be a rotation direction centered on the matrix center point P0 (step S16; Yes), the control unit 11 performs rotation processing (step S17).
[0161] If the sliding direction of the touch position is determined to be not the rotation direction centered on the matrix center point P0 (step S16; no), the control unit 11 ends the matrix operation processing.
[0162] Figure 11 It means Figure 7 The flowchart shows the rotation process performed in step S17. The rotation process is performed by the cooperation of the control unit 11 and the function calculator application 121.
[0163] In the rotation process, the control unit 11 calculates the rotation angle of the touch position (the angle formed by the gesture start point P1, the matrix center point P0, and the touch position. Counterclockwise is positive and clockwise is negative) (step S171), and rotates the entire matrix of the operation object displayed on the display unit 14 by a predetermined angle and displays it according to the rotation angle (step S172).
[0164] Next, the control unit 11 determines whether a touch-off was detected by the touch panel 131 (step S173).
[0165] In a case where it is determined that the touch-off is not detected by the touch panel 131 (step S173; No), the control section 11 determines whether or not a slide of the touch position is detected by the touch panel 131 (step S174).
[0166] In a case where it is determined that the slide of the touch position is detected (step S174; Yes), the control section 11 returns to step S171.
[0167] In a case where it is determined that the slide of the touch position is not detected (step S174; No), the control section 11 returns to step S173.
[0168] In a case where it is determined that the touch-off is detected by the touch panel 131 (step S173; Yes), the control section 11 acquires coordinates of the position at which the touch-off is performed as the gesture end point P2, and acquires an angle formed by the gesture start point PI, the matrix center point PO, and the gesture end point P2 as the rotation angle Θ (step S175). Also, the control section 11 rotates and moves the positions of the components of the matrix of the operation object based on the rotation angle Θ and displays the matrix on the display section 14 (step S176), and ends the rotation processing.
[0169] In addition, in a case where the matrix that becomes the operation object is a matrix included in an equation, the control section 11 further performs re-computation of the equation using the matrix after the rotation processing, and causes the re-computation result to be displayed on the display section 14.
[0170] On the other hand, in a case where it is determined that the touch position detected by the touch panel 131 is not within the valid range of the start of the gesture operation (step S1; No), the control section 11 performs processing corresponding to a normal operation (step S19) and ends the matrix operation processing. Figure 7
[0171] Thus, the control section 11, by performing the matrix operation processing, is able to determine whether a rotation operation is performed, a cyclic shift operation of a row is performed, a cyclic shift operation of a column is performed, or a transposition operation is performed, in a case where a gesture operation (slide) is performed with respect to a matrix displayed on the display section 14, and change the arrangement of the components of the matrix in accordance with the determined operation.
[0172] As described above, the control section 11 of the electronic device 100 causes a matrix in which a plurality of components are arranged to be displayed on the display section 14, and changes the arrangement of the plurality of components within the matrix based on a gesture operation with respect to the matrix displayed on the display section 14.
[0173] Thus, it is possible to move the height of the matrix components quickly by an intuitive operation.
[0174] Further, the control section 11 detects a touch position touched in the display section 14 by the touch panel 131, and determines that a gesture operation is started in a case where the touch position is determined to be within a valid range for start of the gesture operation for the matrix which is set in advance.
[0175] Thus, the user can start the gesture operation for changing the arrangement of the plurality of components in the matrix by touching within the valid range for start of the gesture operation.
[0176] Further, the control section 11 rotates and moves the positions of the components of the matrix with the matrix center point as the center in a case where the gesture operation performed is an operation for rotating the touch position by the matrix center point by a prescribed rotation angle or more.
[0177] Thus, the positions of the components of the matrix can be rotated by a simple operation for rotating the touch position by the matrix center point by a prescribed rotation angle or more.
[0178] Further, the valid range for start of the gesture operation for the rotation operation of the matrix is a prescribed range around the matrix, and thus the positions of the components of the matrix can be rotated by a simple operation for rotating the touch position around the matrix by a prescribed rotation angle or more.
[0179] Further, the control section 11 rotates the positions of the components of the matrix by a prescribed angle with the matrix center point as the center based on the angle by which the touch position is rotated.
[0180] Thus, the user can adjust the angle of rotation of the components of the matrix by adjusting the angle by which the touch position is rotated.
[0181] Further, the control section 11 circularly shifts the components of the operated row in the matrix in a case where the detected touch position (gesture start point) is within a valid range for a certain row set in the matrix, and the gesture operation performed is an operation for sliding the touch position in the horizontal direction.
[0182] Thus, the components of the touched row can be circularly shifted by a simple operation for touching a certain row in the matrix and sliding in the horizontal direction.
[0183] Further, the control section 11 circularly shifts the components of the operated column in the matrix in a case where the detected touch position (gesture start point) is within a valid range for a certain column set in the matrix, and the gesture operation performed is an operation for sliding the touch position in the vertical direction.
[0184] Thus, the components of the touched column can be circularly shifted by a simple operation for touching a certain column in the matrix and sliding in the vertical direction.
[0185] Further, the control section 11 shifts the components of the matrix in a prescribed direction by a prescribed shift amount based on the distance and direction in which the touch position is slid in the circular shift operation.
[0186] Thus, the user can adjust the direction and shift amount of the circular shift of the components of the matrix by adjusting the distance and direction in which the touch position is slid.
[0187] Further, in a case where the detected touch position (gesture start point) is within the effective range set in the upper right portion, lower right portion, upper left portion, or lower left portion of the matrix, and the gesture operation is an operation of sliding the touch position in a diagonal direction across the transposition boundary line Ll, the control section 11 generates a transposed matrix by exchanging the components of the rows and the components of the columns of the matrix.
[0188] Thus, by the operation of sliding the touch position from the upper right portion (or upper left portion) in a diagonal downward direction across the transposition boundary line Ll, or the operation of sliding the touch position from the lower left portion (or lower right portion) in a diagonal upward direction across the transposition boundary line Ll, the components of the rows and the components of the columns of the matrix can be exchanged simply.
[0189] Note that the description in the above embodiments is one example of the matrix operation method, electronic device, and program of the present application, but is not limited thereto.
[0190] For example, in the above embodiments, the electronic device 100 is equipped with the function calculator application 121 for executing the matrix operation method of the present application, and the matrix operation method of the present application is realized by cooperation of the control section 11 of the electronic device 100 and the function calculator application 121 equipped in the electronic device 100, but is not limited thereto. For example, as shown in FIG. 8, the electronic device 100 can be configured to be connected to the Web server 200 via a communication network N such as the Internet, the program for executing the matrix operation method of the present application can be a Web application program 221 that operates in the Web server 200, and the matrix operation method of the present application can be realized by causing the Web application program 221 to be executed by the Web server 200 via a Web browser equipped in the electronic device 100. Figure 12 Figure 13 As shown in FIG. 8, the Web server 200 is configured to include a control section 21 constituted by a CPU or the like, a storage section 22 in which the Web application program 221 is stored, an operation section 23, a display section 24, and a communication section 25, and the sections are connected via a bus 26.
[0191] In a case where the program for executing the matrix operation method of the present application is the Web application 221, the matrix operation corresponding to the gesture operation (the rotation processing, the circular shift processing, the transposition processing described above) is executed by the cooperation of the control section 21 of the Web server 200 side and the Web application 221 stored in the storage section 22. For example, on the browser side of the electronic device 100, in a screen provided by the Web application 221, a matrix is displayed in accordance with a user operation, and in a case where a gesture operation with respect to the matrix is detected, the value of the matrix to be a variable and a matrix deformation function (a function of rotation, circular shift, or transposition) are transmitted to the Web server 200 in the form of a group through the communication section 15. In the Web server 200, by the cooperation of the control section 21 and the Web application 221, an operation of rotation, circular shift, or transposition is performed based on the value of the matrix and the matrix deformation function received from the browser side (the electronic device 100), the result is transmitted to the browser side of the electronic device 100, and the result is displayed on the screen by the browser of the electronic device 100.
[0192] For example, in a case where the matrix rotation function is set as rotate (value of matrix, rotation angle), Figure 3 the value of the matrix on the left side of the arrow is matrix A, the value of the matrix on the right side of the arrow is matrix B, and a gesture operation of rotating matrix A by -90° is implemented, the following actions are performed.
[0193] The matrix rotation function "rotate (matrix A, -90°)" is transmitted to the Web server 200 side by the browser of the electronic device 100. The Web server 200 performs an operation on the received matrix rotation function, and transmits the result "matrix B" to the browser side of the electronic device 100. The browser of the electronic device 100 receives the result "matrix B" through the Web server 200, and displays the result.
[0194] Further, in the above-described embodiments, an operation of touching the screen of the display section by a finger has been described as the touch, but the touch referred to in the present application includes an operation of clicking a mouse and an operation of touching the screen of the display section by a stylus. Further, in the above-described embodiments, a case where the gesture operation of sliding the touch position is based on the sliding of a finger has been described as an example, but the gesture operation can also be based on the dragging of a mouse or the like, and can also be based on the sliding operation of a stylus.
[0195] Further, in the above-described embodiments, an example of using a semiconductor memory such as a ROM, a hard disk as the computer readable medium of the program of the present application has been disclosed, but the present application is not limited to this example. As other computer readable media, a SSD, a CD-ROM, or the like can be applied as a removable type recording medium. Further, as a medium of providing data of the program of the present application via a communication line, a carrier wave (transport wave) can also be applied.
[0196] In addition, the detailed configuration and the detailed operation of the electronic device can be appropriately changed without departing from the gist of the present application.
[0197] The above described embodiments of the present application have been described, but the technical scope of the present application is not limited to the above described embodiments. The technical scope of the present application is determined based on the claims, and further, the equivalent scope of the claims is included in the technical scope of the present application.
Claims
1. A method of matrix operation performed by a computer, characterized by, including: a control process that causes a matrix in which a plurality of components are arranged to be displayed on a display section, and that changes the arrangement of the plurality of components within the matrix based on a gesture operation with respect to the matrix displayed on the display section; and a detection process that detects a touch position with respect to the display section, and that determines that the gesture operation has started in a case where the touch position when touched is within a predetermined effective range for starting the gesture operation with respect to the matrix, the control process causing each component of the matrix to be moved in rotation about a center point of the matrix in a case where the gesture operation is an operation that rotates the touch position about the center point by a predetermined rotation angle or more.
2. The matrix operation method according to claim 1, characterized in that the effective range for starting the gesture operation with respect to the matrix is a predetermined range around the matrix.
3. The matrix operation method according to claim 1, characterized in that the control process causes each component of the matrix to be moved in rotation about the center point by a predetermined angle based on the angle of rotation of the touch position.
4. The matrix operation method according to any one of claims 1 to 3, characterized in that the detection process determines that the gesture operation has ended by touch-off.
5. An electronic device, comprising: provided with: a control section that causes a matrix in which a plurality of components are arranged to be displayed on a display section, and that changes the arrangement of the plurality of components within the matrix based on a gesture operation with respect to the matrix displayed on the display section; and a detection section that detects a touch position that is touched in the display section, and that determines that the gesture operation has started in a case where the touch position when touched is within a predetermined effective range for starting the gesture operation with respect to the matrix, the control section causing each component of the matrix to be moved in rotation about a center point of the matrix in a case where the gesture operation is an operation that rotates the touch position about the center point by a predetermined rotation angle or more.
6. A computer program product characterized by causing a computer to function as: a control section that causes a matrix in which a plurality of components are arranged to be displayed on a display section, and that changes the arrangement of the plurality of components within the matrix based on a gesture operation with respect to the matrix displayed on the display section; and a detection section that detects a touch position that is touched in the display section, and that determines that the gesture operation has started in a case where the touch position when touched is within a predetermined effective range for starting the gesture operation with respect to the matrix, the control section causing each component of the matrix to be moved in rotation about a center point of the matrix in a case where the gesture operation is an operation that rotates the touch position about the center point by a predetermined rotation angle or more.
Citation Information
Patent Citations
Matrix calculation device and program
JP2012243015A
A method and an electronic device for one-head user interface
CN106293454A
Matrix calculation device and storage medium
JP2000181873A
Device and control method capable of touch sensing and touch pressure sensing
US20200089362A1