summaryrefslogtreecommitdiffstats
path: root/src/exceptions
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2006-08-16 12:59:26 +0000
committerKore Nordmann <github@kore-nordmann.de>2006-08-16 12:59:26 +0000
commitbb028918891c1840d200530a0cb458db9a07cf95 (patch)
tree7f98afbf839f41a2e4ad27bb1fb9179f4ce96ee2 /src/exceptions
parentae311d59bf94eb135dfaa1c09dd93e1ebea4ee05 (diff)
downloadzetacomponents-graph-bb028918891c1840d200530a0cb458db9a07cf95.zip
zetacomponents-graph-bb028918891c1840d200530a0cb458db9a07cf95.tar.gz
- Added matrix and polynom classes for future use in statistical datasets
Diffstat (limited to 'src/exceptions')
-rw-r--r--src/exceptions/invalid_dimensions.php25
-rw-r--r--src/exceptions/out_of_boundings.php25
2 files changed, 50 insertions, 0 deletions
diff --git a/src/exceptions/invalid_dimensions.php b/src/exceptions/invalid_dimensions.php
new file mode 100644
index 0000000..e3d98bd
--- /dev/null
+++ b/src/exceptions/invalid_dimensions.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * File containing the ezcGraphMatrixInvalidDimensionsException class
+ *
+ * @package Graph
+ * @version //autogen//
+ * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+/**
+ * Exception thrown when an operation i not possible because of incompatible
+ * matrix dimensions.
+ *
+ * @package Graph
+ * @version //autogen//
+ */
+class ezcGraphMatrixInvalidDimensionsException extends ezcGraphException
+{
+ public function __construct( $rows, $columns, $dRows, $dColumns )
+ {
+ parent::__construct( "Matrix <{$dRows}, {$dColumns}> is incompatible with matrix <{$rows}, {$columns}> for requested operation." );
+ }
+}
+
+?>
diff --git a/src/exceptions/out_of_boundings.php b/src/exceptions/out_of_boundings.php
new file mode 100644
index 0000000..8fe5848
--- /dev/null
+++ b/src/exceptions/out_of_boundings.php
@@ -0,0 +1,25 @@
+<?php
+/**
+ * File containing the ezcGraphMatrixOutOfBoundingsException class
+ *
+ * @package Graph
+ * @version //autogen//
+ * @copyright Copyright (C) 2005, 2006 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+/**
+ * Exception thrown when a rrequested matrix value is out of the boundings of
+ * the matrix.
+ *
+ * @package Graph
+ * @version //autogen//
+ */
+class ezcGraphMatrixOutOfBoundingsException extends ezcGraphException
+{
+ public function __construct( $rows, $columns, $rPos, $cPos )
+ {
+ parent::__construct( "Position <{$rPos}, {$cPos}> is out of the matrix boundings <{$rows}, {$columns}>." );
+ }
+}
+
+?>
OpenPOWER on IntegriCloud