4
by Viktor Bursian
multiple changes |
1 |
////////////////////////////////////////////////////////////////////////////////
|
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
2 |
/*! @file DataArrayRecord.cpp A record with a data array (as a dependence).
|
4.21.10
by Viktor Bursian at blin-ubuntu
Expressions: first success on math over functions (now adding functions and showing them). |
3 |
- Part of RANet - Research Assistant Net Library.
|
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
4 |
- Copyright(C) 2010-2017, Viktor E. Bursian, St.Petersburg, Russia.
|
4.40.9
by Viktor Bursian at blin-ubuntu
appearances: tidying up |
5 |
Viktor_dot_Bursian_at_mail_dot_ioffe_dot_ru
|
4
by Viktor Bursian
multiple changes |
6 |
*/////////////////////////////////////////////////////////////////////////////// |
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
7 |
#include "DataArrayRecord.h" |
4
by Viktor Bursian
multiple changes |
8 |
#include "Log.h" |
9 |
namespace RA { |
|
10 |
//------------------------------------------------------------------------------
|
|
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
11 |
//--------------------------------------------------------- sDataArrayRecord ---
|
4
by Viktor Bursian
multiple changes |
12 |
|
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
13 |
sDataArrayRecord::~sDataArrayRecord () |
4
by Viktor Bursian
multiple changes |
14 |
{
|
15 |
if( Values ){ |
|
16 |
delete [] Values; Values=NULL; |
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
17 |
}
|
4
by Viktor Bursian
multiple changes |
18 |
}
|
19 |
||
20 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
21 |
sDataArrayRecord::sDataArrayRecord (int number_of_points |
22 |
,real x0 |
|
23 |
,real step) |
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
24 |
:sArrayDataFunction(number_of_points,x0,step) |
25 |
,sRecord() |
|
4
by Viktor Bursian
multiple changes |
26 |
{
|
27 |
}
|
|
28 |
||
29 |
||
8.1.4
by Viktor Bursian at blin-ubuntu
sRecord::sRecord() made public, new constructors added to sData...Folder and sData...Record classes |
30 |
sDataArrayRecord::sDataArrayRecord (rcsPhysPair multiplier |
31 |
,int number_of_points |
|
32 |
,real x0 |
|
33 |
,real step) |
|
34 |
:sArrayDataFunction(multiplier,number_of_points,x0,step) |
|
35 |
,sRecord() |
|
36 |
{
|
|
37 |
}
|
|
38 |
||
39 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
40 |
sDataArrayRecord::sDataArrayRecord (int record_no |
41 |
,rcsPhysPair multiplier |
|
42 |
,int number_of_points |
|
43 |
,real x0 |
|
44 |
,real step) |
|
4.41.6
by Viktor Bursian at blin-ubuntu
new constructors for sArrayTypeDependence and its ancestors (necessary for import); also sTime evolution |
45 |
:sArrayDataFunction(multiplier,number_of_points,x0,step) |
46 |
,sRecord(record_no) |
|
47 |
{
|
|
48 |
}
|
|
49 |
||
50 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
51 |
sDataArrayRecord::sDataArrayRecord (std::istream & a_stream |
52 |
,rcsVersion version) |
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
53 |
:sArrayDataFunction(a_stream,version) |
54 |
,sRecord(a_stream,version) |
|
4
by Viktor Bursian
multiple changes |
55 |
{
|
9.1.4
by Viktor Bursian @pryanik-ubuntu
type real changes from long double (in fact __float80) to double |
56 |
if( version <= sVersion(0,9) ){ |
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
57 |
sPhysPair M(a_stream,version); |
58 |
TheMultiplier = M; |
|
59 |
a_stream.READ_INTO(TheNumberOfPoints); |
|
60 |
ASSERT( TheNumberOfPoints > 0 ); |
|
9.20.1
by Viktor Bursian
necessary changes for 64-bit |
61 |
realIOv14 R; |
9.1.4
by Viktor Bursian @pryanik-ubuntu
type real changes from long double (in fact __float80) to double |
62 |
a_stream.READ_INTO(R); TheX0=R; |
63 |
a_stream.READ_INTO(R); TheStep=R; |
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
64 |
Values= new real [TheNumberOfPoints]; |
65 |
for( int PointNo=0 ; PointNo < TheNumberOfPoints ; PointNo++ ){ |
|
9.1.4
by Viktor Bursian @pryanik-ubuntu
type real changes from long double (in fact __float80) to double |
66 |
a_stream.READ_INTO(R); Values[PointNo]=R; |
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
67 |
}
|
68 |
}
|
|
4
by Viktor Bursian
multiple changes |
69 |
}
|
70 |
||
71 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
72 |
void sDataArrayRecord::Store (std::ostream & a_stream) const |
4
by Viktor Bursian
multiple changes |
73 |
{
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
74 |
sArrayDataFunction::Store(a_stream); |
75 |
sRecord::Store(a_stream); |
|
4
by Viktor Bursian
multiple changes |
76 |
}
|
77 |
||
78 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
79 |
void sDataArrayRecord::CopyFrom (psNode other) |
4.4.29
by Viktor Bursian at blin-Ubuntu
Исправлен недавно привнесённый баг в спасении атрибутов (на самом деле, это была просто недоделанная переделка). Развитие sAdminWindow. Подключены почти все модули RANet. |
80 |
{
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
81 |
sRecord::CopyFrom(other); |
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
82 |
psDataArrayRecord Other = dynamic_cast<psDataArrayRecord>(other); |
4.4.29
by Viktor Bursian at blin-Ubuntu
Исправлен недавно привнесённый баг в спасении атрибутов (на самом деле, это была просто недоделанная переделка). Развитие sAdminWindow. Подключены почти все модули RANet. |
83 |
if( Other ){ |
84 |
if( TheNumberOfPoints != Other->TheNumberOfPoints ){ |
|
85 |
if( Values ){ |
|
86 |
delete [] Values; Values = NULL; |
|
87 |
}
|
|
88 |
TheNumberOfPoints = Other->TheNumberOfPoints; |
|
89 |
if( TheNumberOfPoints > 0 ) |
|
90 |
Values = new real [TheNumberOfPoints]; |
|
91 |
}
|
|
92 |
TheX0 = Other->TheX0; |
|
93 |
TheStep = Other->TheStep; |
|
4
by Viktor Bursian
multiple changes |
94 |
for( int PointNo=0 ; PointNo < TheNumberOfPoints ; PointNo++ ){ |
4.4.29
by Viktor Bursian at blin-Ubuntu
Исправлен недавно привнесённый баг в спасении атрибутов (на самом деле, это была просто недоделанная переделка). Развитие sAdminWindow. Подключены почти все модули RANet. |
95 |
Values[PointNo]=Other->Values[PointNo]; |
4
by Viktor Bursian
multiple changes |
96 |
};
|
4.4.29
by Viktor Bursian at blin-Ubuntu
Исправлен недавно привнесённый баг в спасении атрибутов (на самом деле, это была просто недоделанная переделка). Развитие sAdminWindow. Подключены почти все модули RANet. |
97 |
MarkAsEdited(); |
98 |
}
|
|
4
by Viktor Bursian
multiple changes |
99 |
}
|
100 |
||
101 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
102 |
sString sDataArrayRecord::Text (eTextFormat format |
103 |
,eTextDetalization detalization) |
|
4.21.12
by Viktor Bursian at blin-ubuntu
Expessions on functions: yet another step. And, by the way, version changed back to 1.0.0-alpha. |
104 |
{
|
105 |
sString T; |
|
106 |
T = sFunction::Text(format,detalization); |
|
107 |
T += sRecord::Text(format,detalization); |
|
108 |
if( detalization > Laconic ){ |
|
109 |
T += sString(" [") + TheMultiplier.Y.Units().Text(format) |
|
110 |
+sString("(") + TheMultiplier.X.Units().Text(format) + sString(")]"); |
|
111 |
}
|
|
112 |
return T; |
|
4
by Viktor Bursian
multiple changes |
113 |
}
|
114 |
||
115 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
116 |
void sDataArrayRecord::SetAppearance (psAppearance appearance) |
4.40.5
by Viktor Bursian at blin-ubuntu
Almost complete functionality for intrinsic appearances |
117 |
{
|
118 |
QMutexLocker BodyLocker(&BodyMutex); |
|
119 |
sArrayDataFunction::SetAppearance(appearance); |
|
120 |
MarkAsEdited(); |
|
121 |
}
|
|
122 |
||
123 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
124 |
psMathValue sDataArrayRecord::MathValue () |
4.21.13
by Viktor Bursian at blin-ubuntu
Expessions: Wow! There is something to work on, but WOW! |
125 |
{
|
126 |
QMutexLocker BodyLocker(&BodyMutex); |
|
127 |
return Replica(); |
|
128 |
}
|
|
129 |
||
130 |
||
8.1.3
by Viktor Bursian at blin-ubuntu
Classes s*TypeDependence renamed to sData*Record; new classes sData*Folder added; CSVImportDialog changed |
131 |
void sDataArrayRecord::SetValue (int N ,real V) |
4
by Viktor Bursian
multiple changes |
132 |
{
|
4.21.13
by Viktor Bursian at blin-ubuntu
Expessions: Wow! There is something to work on, but WOW! |
133 |
QMutexLocker BodyLocker(&BodyMutex); |
4
by Viktor Bursian
multiple changes |
134 |
if( (N >= 0) && (N < TheNumberOfPoints) ){ |
135 |
Values[N]=V; |
|
4.2.18
by Viktor Bursian at blin-ubuntu
Bad idea declined: recalculation of boundaries while intensively forming spectrum values. |
136 |
// if( ! RecalculateBoundaries )
|
137 |
// LastBoundaries.Y |= V * Multiplier().Y;
|
|
138 |
RecalculateBoundaries = true; |
|
4.4.29
by Viktor Bursian at blin-Ubuntu
Исправлен недавно привнесённый баг в спасении атрибутов (на самом деле, это была просто недоделанная переделка). Развитие sAdminWindow. Подключены почти все модули RANet. |
139 |
MarkAsEdited(); |
4.21.13
by Viktor Bursian at blin-ubuntu
Expessions: Wow! There is something to work on, but WOW! |
140 |
}
|
4
by Viktor Bursian
multiple changes |
141 |
}
|
142 |
||
143 |
//------------------------------------------------------------------------------
|
|
144 |
} //namespace RA |
|
145 |
||
146 |
||
147 |
||
148 |