forked from milleratotago/Cupid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddPosTrans.m
More file actions
31 lines (23 loc) · 931 Bytes
/
Copy pathAddPosTrans.m
File metadata and controls
31 lines (23 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
classdef AddPosTrans < AddTrans
% AddPosTrans(BasisRV,Addend): Shifts the BasisRV by the specified additive constant which is constrained to be positive.
methods
function obj=AddPosTrans(varargin) % BasisDist,Addend
obj=obj@AddTrans;
obj.FamilyName = 'AddPosTrans';
switch nargin
case 0
case 2
obj.Setup(varargin{:});
otherwise
ME = MException('AddPosTrans:Constructor','AddPosTrans constructor needs 0 or 2 arguments.');
throw(ME);
end
end
function TransReals = TransParmsToReals(~, Parms,~)
TransReals = sqrt(Parms(end));
end
function TransParms = TransRealsToParms(~, Reals,~)
TransParms = Reals(end)^2;
end
end % methods
end % class AddPosTrans