Revision 1952

trunk/src/linad99/d4arr.hpp (revision 1952)
1
/*
2
 * $Id$
3
 *
4
 * Author: David Fournier
5
 * Copyright (c) 2008-2012 Regents of the University of California
6
 *
7
 * ADModelbuilder and associated libraries and documentations are
8
 * provided under the general terms of the "New BSD" license
9
 *
10
 * License:
11
 *
12
 * Redistribution and use in source and binary forms, with or without
13
 * modification, are permitted provided that the following conditions are
14
 * met:
15
 *
16
 * 1. Redistributions of source code must retain the above copyright
17
 * notice, this list of conditions and the following disclaimer.
18
 *
19
 * 2.  Redistributions in binary form must reproduce the above copyright
20
 * notice, this list of conditions and the following disclaimer in the
21
 * documentation and/or other materials provided with the distribution.
22
 *
23
 * 3.  Neither the name of the  University of California, Otter Research,
24
 * nor the ADMB Foundation nor the names of its contributors may be used
25
 * to endorse or promote products derived from this software without
26
 * specific prior written permission.
27
 *
28
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
 *
40
 */
41
/**
42
 * \file
43
 * Description not yet available.
44
 */
45
#ifndef D4ARR_HPP
46
#define D4ARR_HPP
47

  
48
/**
49
 * Description not yet available.
50
 * \param
51
 */
52
  class four_array_shape
53
  {
54
    unsigned int ncopies;
55
    int hslice_min;
56
    int hslice_max;
57
    int slice_min;
58
    int slice_max;
59
    int row_min;
60
    int row_max;
61
    int col_min;
62
    int col_max;
63
    four_array_shape(int hsl,int hsu, int sl,int sh,int rl,
64
      int ru,int cl,int cu);
65
    //mat_shape(){};
66

  
67
    friend class d4_array;
68
    friend class dvar4_array;
69
  }; // End of class four_array_shape
70

  
71
/**
72
 * Description not yet available.
73
 * \param
74
 */
75
class d4_array
76
{
77
  four_array_shape * shape;
78
  d3_array * t;
79
public:
80
  void allocate(int hsl,int hsu,int sl,int sh,int nrl,
81
    int nrh,int ncl,int nch);
82
  void allocate(int hsl, int hsu, int sl, const ivector& sh, int nrl,
83
                const imatrix& nrh, int ncl, const imatrix& nch);
84
  void allocate(int hsl, int hsu, int sl, const ivector& sh, int nrl,
85
                const imatrix& nrh, int ncl, const i3_array& nch);
86
  void allocate(int hsl, int hsu, int sl, int sh, int nrl,
87
                int nrh, const ivector& ncl, const ivector& nch);
88
  void allocate(int hsl, int hsu, int sl, int sh, const ivector& nrl,
89
                const ivector& nrh, const ivector& ncl, const ivector& nch);
90
  void allocate(int hsl, int hsu, int sl, const ivector& sh,
91
                int nrl, const imatrix& nrh, int ncl, int nch);
92
  void deallocate(void);
93
  void allocate(void);
94
  void allocate(const d4_array&);
95
  void allocate(const dvar4_array&);
96
  int operator!(void) const { return (shape == NULL); }
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff