Mercurial > hg > octave-lyh
comparison src/ov.h @ 4559:802818bfac91
[project @ 2003-10-28 19:13:43 by jwe]
author | jwe |
---|---|
date | Tue, 28 Oct 2003 19:13:43 +0000 |
parents | 78e34346f6fd |
children | 742993a501b9 |
comparison
equal
deleted
inserted
replaced
4558:239df9c618ef | 4559:802818bfac91 |
---|---|
329 { return rep->length (); } | 329 { return rep->length (); } |
330 | 330 |
331 virtual int ndims (void) const | 331 virtual int ndims (void) const |
332 { return rep->ndims (); } | 332 { return rep->ndims (); } |
333 | 333 |
334 virtual int numel (void) const | |
335 { return rep->numel (); } | |
336 | |
334 // Does this constant have a type? Both of these are provided since | 337 // Does this constant have a type? Both of these are provided since |
335 // it is sometimes more natural to write is_undefined() instead of | 338 // it is sometimes more natural to write is_undefined() instead of |
336 // ! is_defined(). | 339 // ! is_defined(). |
337 | 340 |
338 virtual bool is_defined (void) const | 341 virtual bool is_defined (void) const |
339 { return rep->is_defined (); } | 342 { return rep->is_defined (); } |
340 | 343 |
341 bool is_undefined (void) const | 344 bool is_undefined (void) const |
342 { return ! is_defined (); } | 345 { return ! is_defined (); } |
343 | 346 |
347 bool is_empty (void) const | |
348 { return numel () == 0; } | |
349 | |
344 virtual bool is_cell (void) const | 350 virtual bool is_cell (void) const |
345 { return rep->is_cell (); } | 351 { return rep->is_cell (); } |
346 | 352 |
347 virtual bool is_real_scalar (void) const | 353 virtual bool is_real_scalar (void) const |
348 { return rep->is_real_scalar (); } | 354 { return rep->is_real_scalar (); } |
422 | 428 |
423 // Does this constant correspond to a truth value? | 429 // Does this constant correspond to a truth value? |
424 | 430 |
425 virtual bool is_true (void) const | 431 virtual bool is_true (void) const |
426 { return rep->is_true (); } | 432 { return rep->is_true (); } |
427 | |
428 // Is at least one of the dimensions of this constant zero? | |
429 | |
430 virtual bool is_empty (void) const | |
431 { return rep->is_empty (); } | |
432 | 433 |
433 // Are the dimensions of this constant zero by zero? | 434 // Are the dimensions of this constant zero by zero? |
434 | 435 |
435 virtual bool is_zero_by_zero (void) const | 436 virtual bool is_zero_by_zero (void) const |
436 { return rep->is_zero_by_zero (); } | 437 { return rep->is_zero_by_zero (); } |