comparison {cubing} | R Documentation |

## Logical Comparison for Cube Objects

### Description

Determine if two cubes are equal, accounting for recoloring and rotation.

### Usage

```
## S3 method for class 'cube'
aCube == bCube
## S3 method for class 'cube'
all.equal(target, current, ...)
```

### Arguments

`aCube` , `target` |
Any cube object. |

`bCube` , `current` |
Any cube object. |

`...` |
Not used. |

### Details

Two cubes are defined to be equal via `==`

if they are the same except perhaps for
a recoloring. This means that the permutation and orientation components are the
same but the spatial orientation component may be different.

Two cubes are defined to be the same via `all.equal`

if and only if one cube is equal
to the other following any of the 24 rotations of the whole cube (including
the no rotation case).

For testing if two cubes are exactly identical, you can use the **R** function
`identical`

, however the cubes must be of the same type; either both cubieCubes
or both stickerCubes.

### Value

A logical value.

### See Also

### Examples

```
aCube <- randCube()
bCube <- rotate(aCube, "y'")
aCube == bCube
```

[Package

*cubing*version 1.0-5 Index]