  For a graph $G=(V,E)$ and $v_{i}\in V$, denote by $d_{i}$ the degree of
vertex $v_{i}$. Let $f(x, y)>0$ be a real symmetric function in $x$ and $y$.
The weighted adjacency matrix $A_{f}(G)$ of a graph $G$ is a square matrix,
where the $(i,j)$-entry is equal to $\displaystyle f(d_{i}, d_{j})$ if the
vertices $v_{i}$ and $v_{j}$ are adjacent and 0 otherwise. Li and Wang
\cite{U9} tried to unify methods to study spectral radius of weighted adjacency
matrices of graphs weighted by various topological indices. If $\displaystyle
f'_{x}(x, y)\geq0$ and $\displaystyle f''_{x}(x, y)\geq0$, then $\displaystyle
f(x, y)$ is said to be increasing and convex in variable $x$, respectively.
They obtained the tree with the largest spectral radius of $A_{f}(G)$ is a star
or a double star when $f(x, y)$ is increasing and convex in variable $x$. In
this paper, we add the following restriction: $f(x_{1},y_{1})\geq
f(x_{2},y_{2})$ if $x_{1}+y_{1}=x_{2}+y_{2}$ and $\mid x_{1}-y_{1}\mid>\mid
x_{2}-y_{2}\mid$
  and call $A_f(G)$ the restrictedly weighted adjacency matrix of $G$. The
restrictedly weighted adjacency matrix contains weighted adjacency matrices
weighted by first Zagreb index, first hyper-Zagreb index, general
sum-connectivity index, forgotten index, Somber index, $p$-Sombor index and so
on. We obtain the extremal trees with the smallest and the largest spectral
radius of $A_{f}(G)$. Our results push ahead Li and Wang's research on unified
approaches.
