-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrandom_init.f90
More file actions
36 lines (27 loc) · 820 Bytes
/
random_init.f90
File metadata and controls
36 lines (27 loc) · 820 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
30
31
32
33
34
35
!
! File: distance.f90
! Author: peter
!
! Created on May 6, 2020, 12:49 PM
!
module random_init
use init
implicit none
private
public::init_start_w, init_start_h
contains
function init_start_w(A, rank)result(W)
real, Dimension(:,:), intent(in)::A
integer, intent(in)::rank
real, Dimension(size(A,1),rank)::W
real, Dimension(rank,size(A,1)):: H
W = init_matrix(size(A,1),rank)
end function init_start_w
function init_start_h(A, rank)result(H)
real, Dimension(:,:), intent(in)::A
integer, intent(in)::rank
real, Dimension(size(A,1),rank)::W
real, Dimension(rank,size(A,1)):: H
H = init_matrix(rank,size(A,2))
end function init_start_h
end module random_init