summaryrefslogtreecommitdiff
path: root/lib/matrix.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/matrix.rb')
-rw-r--r--lib/matrix.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/matrix.rb b/lib/matrix.rb
index 0f4633212c..12116dbe99 100644
--- a/lib/matrix.rb
+++ b/lib/matrix.rb
@@ -478,17 +478,17 @@ class Matrix
end
#
- # Returns +true+ if this is a regular matrix.
+ # Returns +true+ if this is a regular (i.e. non-singular) matrix.
#
def regular?
- square? and rank == column_size
+ not singular?
end
#
- # Returns +true+ is this is a singular (i.e. non-regular) matrix.
+ # Returns +true+ is this is a singular matrix.
#
def singular?
- not regular?
+ determinant == 0
end
#