Skip to content

Commit a197fa3

Browse files
committed
SemObsData: remove rowwise
* it is unused * if ever rowwise access would be required, it could be done with eachrow(data) without allocation
1 parent 277f146 commit a197fa3

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

src/observed/data.jl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ For observed data without missings.
2424
- `samples(::SemObservedData)` -> observed data
2525
- `obs_cov(::SemObservedData)` -> observed.obs_cov
2626
- `obs_mean(::SemObservedData)` -> observed.obs_mean
27-
- `data_rowwise(::SemObservedData)` -> observed data, stored as vectors per observation
2827
2928
## Implementation
3029
Subtype of `SemObserved`
@@ -37,15 +36,13 @@ use this if you are sure your observed data is in the right format.
3736
## Additional keyword arguments:
3837
- `spec_colnames::Vector{Symbol} = nothing`: overwrites column names of the specification object
3938
- `compute_covariance::Bool ) = true`: should the covariance of `data` be computed and stored?
40-
- `rowwise::Bool = false`: should the data be stored also as vectors per observation
4139
"""
42-
struct SemObservedData{A, B, C, R} <: SemObserved
40+
struct SemObservedData{A, B, C} <: SemObserved
4341
data::A
4442
obs_cov::B
4543
obs_mean::C
4644
n_man::Int
4745
n_obs::Int
48-
data_rowwise::R
4946
end
5047

5148
# error checks
@@ -61,7 +58,6 @@ function SemObservedData(;
6158
spec_colnames = nothing,
6259
meanstructure = false,
6360
compute_covariance = true,
64-
rowwise = false,
6561
kwargs...,
6662
)
6763
if isnothing(spec_colnames) && !isnothing(specification)
@@ -109,7 +105,6 @@ function SemObservedData(;
109105
meanstructure ? vec(Statistics.mean(data, dims = 1)) : nothing,
110106
size(data, 2),
111107
size(data, 1),
112-
rowwise ? [data[i, :] for i in axes(data, 1)] : nothing,
113108
)
114109
end
115110

@@ -126,7 +121,6 @@ n_man(observed::SemObservedData) = observed.n_man
126121

127122
obs_cov(observed::SemObservedData) = observed.obs_cov
128123
obs_mean(observed::SemObservedData) = observed.obs_mean
129-
data_rowwise(observed::SemObservedData) = observed.data_rowwise
130124

131125
############################################################################################
132126
### Additional functions

0 commit comments

Comments
 (0)